When creating a filament table on a freshly installed Laravel, and using the visibility with a Policy check, there's an error:
Too few arguments to function App\Policies\PermissionPolicy::delete(), 1 passed in /Users/jeordy/Projects/PrintDeck/dev/filament-visibility-bug/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php on line 811 and exactly 2 expected
Package
filament/tables
Package Version
v3.2.92
Laravel Version
v11.12.0
Livewire Version
v3.5.1
PHP Version
PHP 8.3.8
Problem description
When creating a filament table on a freshly installed Laravel, and using the visibility with a Policy check, there's an error:
Too few arguments to function App\Policies\PermissionPolicy::delete(), 1 passed in /Users/jeordy/Projects/PrintDeck/dev/filament-visibility-bug/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php on line 811 and exactly 2 expected
Table:
Policy:
Expected behavior
It should pass the policy and go to the delete() function
Steps to reproduce
Install repo, do a php artisan migrate:fresh --seed. Then register/login and go to http://yourproject.test/permissions. Click on the delete button.
Reproduction repository (issue will be closed if this is not valid)
https://github.com/Jeordy/filament-visibility-bug
Relevant log output
No response
Donate 💰 to fund this issue