Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
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