Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
namespace App\Policies;
use App\Models\Post;
use App\Models\User;
class PostPolicy
* Determine if the user can update the post.
public function update(User $user): bool
return $user->role == 'admin';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment