Courses

10+ Laravel Refactoring Examples

5-Step Refactoring When Client Changes Their Mind Multiple Times

avatar

Hi, in the last refactoring (when applying the spatie package), it seems we don't need to define the Gate permission in the boot of the service provider anymore, because spatie already handles this for us, am I right?

For example: When we use $this->authorize($permissionName), @can($permissionName)... in action, view. The spatie package will check whether the current user has $permissionName or not (via checking data in the spatie tables roles, permissions.... in database)

Thank you

avatar

This course was done a long time ago so I don't remember (or Spatie improved it), perhaps you're right.

avatar
You can use Markdown
avatar
You can use Markdown