namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class PostPolicy
{
use HandlesAuthorization;
public function index(User $user)
{
return true;
}
}
auth()->user()->can('index', Post::class);