Thank you for your video, it really helps me a lot. However, I found out that when you enter the URL for a non-admin user (/admin/users for instance), you still can have access.... I suggest that you should put these two lines inside Kernel.php: 'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class, 'permission' => \Spatie\Permission\Middlewares\PermissionMiddleware::class, Also add this line in the web.php, for example, to have a 403 error if the user wants to enter the URL for access to the user's page Route::get('/admin/users', 'AdminController@index')->middleware(['auth','role:admin']); Be sure that this line is before this Route::any('/admin/{any?}', 'AdminController@index')->where('any','.*')->middleware('auth'); Hope it will help.
😭😭 You have no idea how happy I am to finally find this video after a number of attempts to expose the permissions to the frontend. God bless you
Thank you for your video, it really helps me a lot.
However, I found out that when you enter the URL for a non-admin user (/admin/users for instance), you still can have access....
I suggest that you should put these two lines inside Kernel.php:
'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class,
'permission' => \Spatie\Permission\Middlewares\PermissionMiddleware::class,
Also add this line in the web.php, for example, to have a 403 error if the user wants to enter the URL for access to the user's page
Route::get('/admin/users', 'AdminController@index')->middleware(['auth','role:admin']);
Be sure that this line is before this
Route::any('/admin/{any?}', 'AdminController@index')->where('any','.*')->middleware('auth');
Hope it will help.
can you apply with vue router guard
How to add permission for api routes/Models. appreciate your explain with video.. thank you
hello!, excuse me, how can I make login/register in this project using vuetify ? TxU.
E se eu quisesse fazer um can, como seria?
ありがとうございました!
how would set default user role upon registering?
create listener for userRegistered event that laravel fires
@@WebDevMatics And how can i use the exposed permissions and roles in my vue router ?
Thank you! This video save my life!!!
Glad it helped!
@@WebDevMatics if using API authentication how can I get the user?
thank you man appreciate apperciate your work
The BEST as always!
Please add a course that includes the module @nuxtjs/auth (Fully authentication) (login, register, middleware, guard, activation)
I will check that out. Thanks for the suggestion.
on NuxtJs its much easier to use Token verification than using laravel authentication
add more videos with more features
thanks