Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove create button inside filamentPHP view

I am currently working on a Laravel project using filamentPHP. However I cannot find a way to delete the create functionality for a specific resource. Considering there is a resource named Customer, in the view page, I would like to remove the new customer button located at the top of the list. Is there any way to do that?

like image 293
Marcellin Khoury Avatar asked Feb 01 '26 11:02

Marcellin Khoury


1 Answers

I'm using filament v2.16.66 with Laravel 9.19.

What works for me in order to remove create button in certain lists, is adding the following function in eg: App\Filament\Resources\CustomerResource

    public static function canCreate(): bool
   {
      return false;
   }
like image 89
Farid Avatar answered Feb 03 '26 06:02

Farid