I enjoy sharing knowledge. So enjoy the list of tutorials below.

July 6, 2020

Use Morph Map names to resolve Model for Laravel Gate Policies

When using the Blade directives in Laravel for authorizing resources and actions such as the @can and @cannot you have to place the classes full path into the function, eg @can(\App\User::class) or @can('App\User').

I had a cunning plan to extend the way the Gate class resolves the models in the same way as it does with Policy classes.

4 min read →

Sign up for a newsletter