spatie/laravel-permission

Problem with middleware definition method in the controller in Laravel 11

sirwanveisi opened this issue · 0 comments

I use Laravel 11 and spatie/laravel-permission V6.
My problem is that the document is not updated for laravel 11!
In Doc, for the middleware definition method in the controller, this is written:

Screenshot 2024-04-02 213339

But the method of defining the middleware in the controller in version 11 of Laravel is as follows:

Screenshot 2024-04-02 213328

Reference:
https://spatie.be/docs/laravel-permission/v6/basic-usage/middleware#content-controllers
https://laravel.com/docs/11.x/controllers#controller-middleware