Roles & Permissions | Build Blog with Laravel, Livewire & Filament #13
Vložit
- čas přidán 29. 09. 2023
- Welcome to our laravel blog project series, in this comprehensive series we will build a blog from scratch using livewire 3 and filament 3.
Today we are going to implement a simple roles and permissions setup and also cover how to prevent regular users from accessing our admin panel
We will cover how to install and customize jetstream, create layouts, setup database migrations and models, display posts, use livewire 3 to create dynamic components without page reloads and more.
Next Episodes (Playlist):
• Build Blog with Larave...
Html Template :
github.com/yelocode/tailwind-...
Project Code :
github.com/yelocode/laravel-b...
Filament Documentation :
filamentphp.com/docs/3.x/pane...
Free Livewire 3 Course Playlist :
• Laravel Livewire 3 Cou...
Livewire 3 website :
livewire.laravel.com/
If you would like me to make more livewire videos, please let me know by liking the video and commenting what you like to learn next.
What is livewire:
Livewire is a full-stack framework for Laravel that makes building dynamic interfaces simple, without leaving the comfort of Laravel. (Taken from Livewire Documentation)
06:40 - user filament-resource
10:20 - user access panel method
18:00 - laravel policies
24:00 - removing functionality from roles
24:20 - bulk actions
30:45 - authorized user role button
33:15 - wire:navigate issue fixed
таких классных видосов по крипте я еще не видел) ну и вообще не ожидал услышать такие разговоры от девушки)))
Thanks for making such a thorough tutorial on this topic... looking for more advanced topics
Thanks for watching.
Hope you are in best form! Thank you, and welcome back
Thank you
Great job, as usual :-)
I'm still learning and thanks to you, I like PHP more and more every day
Thanks for watching. Great to hear
Great ❤ More every day 👍🏼
Thanks for watching.
It is very useful. Thank you so much 🌸
Glad it was helpful!
Saved my day ❤
Glad to hear that. Btw super thanks for the super like/sticker. I'm unable to see your comment with the super thanks to reply to it.
Great video 👍
Thank you
Thanks Man
thanks, great video! but is there someone here knows how to redirect or customize the logout page of filament. I can't find the file in apps/controllers/filament
Thanks Master!!
Thanks for watching
Very nice 👍
Thank you! Cheers!
thank you sir for this great tutorials,
one more thing that I'm confused about is that how is redirecting to the proper route happening in this case? I mean how can I send the user to the user panel and admin to the Admin panel and what if we have 3 or more roles of people in our implementation?
I'm currently learning to create a veterinary clinic website, should I make customers/pet owners to fill in appointments, medical records, etc. on the front page or fill in on the filament panel?
thanks of everthing
Thank you for watching.
Thanks Boss 😍 i hope you good now
Thank you Hamad
Awesome video tutorial. Love from India.
I have a question with respect to roles and permissions: can you make a video of how to navigate to different pages on login based on roles. Ex: User -> navigate him to home page, if Editor -> navigate him to page xyz and if admin -> navigate him to filament dashboar/ filament admin pane.
I tried to do it my self but confused with using Jetstream and filament manages it own routes. your thoughts and comments will be helpful. if you make a video about it its great!
Thank you
This is great sir., i just have question, how can we add the pxlrbt/filament-excel export in the policy? thank you.
ex:
public function export(User $user, Item $item): bool
{
return $user->isAdmin();
}
Is it better to separate the role or this ?
Do you mean separate to different permissions?
if so, that depends on your applications, having permissions gives you more flexibility but requires more development time and adds complexity. If your app is simple, you can just use roles, but for complex app you'll have to implement a permission based system or use something like spatie permissions library.
Pourquoi mettre une "string" et non pas un type "enum" pour les rôles ? Why don't you choose an enum for roles ?
Why not create a table Roles and create Roles with permission inside? You can control in frontend, not necessary change code to create roles
I also have the same question ❓