Skip to main content

5-Step Refactoring When Client Changes Their Mind Multiple Times

Premium
14:13
Huy Nguyen 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

Povilas Korop avatar

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

👍 2

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.