So I'm trying to hide buttons in Laravel Nova resource. But I dont know what i can add to the code.
Those buttons:
I found a solution first you create a policy via artisan command: php artisan make:policy ModelNamePolicy --model=ModelName
then you get a file in app/Policies/ModelNamePolicy.php
public function view(User $user, InstructorOverview $instructorOverview) {
return false;
}
And you can just return false in functions view, create, update, delete, restore, forceDelete.