mmonari wrote a comment+100 XP
3mos ago
Hello Jeremy, Just some quick feedback. I gotta say, I love this "vanilla" way of simply writing code to pass on ideas and concepts. Without interference from auto completion tools while listening to and watching you in action, this makes so much easier to assimilate it all.
While you probably should've extracted functionalities to services and used Livewire, It is just as nice to watch it being built like that ๐ thanks so much for this great series!
mmonari wrote a comment+100 XP
3mos ago
The addition of an abstract 'BasePanelProvider' is of great value in code maintainability! Thanks for sharing that great tip!
mmonari wrote a comment+100 XP
4mos ago
Hey Kevin, awesome video class! I really liked the tip on ->strictAuthorization() in Filament panels to ensure all base models policies are covered. I'll definitely be using that from now on.
Regarding custom Filament Actions, when using the ->authorize() macro, I'd like to share a helpful tip: instead of passing an entire Gate check class with its parameters, you can simply pass a string with the name of the policy method to be checked. You can include additional parameters if needed, but using just a string provides better readability and convenience from automatic model binding, in which current model record is automatically available in view/edit pages, or the resource model class in listing pages, along with current User of course. So sometimes, all an action needs is ->authorize('custom') where 'custom' is a policy method defined in ModelPolicy.
Please correct me if I am wrong on this one ๐ค๐พ