Open sayadkm opened 2 years ago
I suggest to read:
https://laravel.com/docs/9.x/authorization
or, when having more complex situation, to use a extension like
https://github.com/JosephSilber/bouncer
which integrates nicely with livewire-datatables !
I suggest to read:
https://laravel.com/docs/9.x/authorization
or, when having more complex situation, to use a extension like
https://github.com/JosephSilber/bouncer
which integrates nicely with livewire-datatables !
But I didn't see any proper section regarding restricting the action column (Delete/Edit) for a perticular user type in datatables in the above mentioned docs
You can publish the views with
php artisan vendor:publish --provider="Mediconesystems\LivewireDatatables\LivewireDatatablesServiceProvider"
and adjust the views to your custom situation. Ensure to also restrict the actions in your Controllers.
I am having users list table with action for Delete and Edit, but I want to restrict the action only for Admin users, how can I add the action column only for admin users and for non admins don't need to show the column