Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

5-Step Refactoring When Client Changes Their Mind Multiple Times

Premium
14:13

Comments & Discussion

HN
Huy Nguyen ✓ Link copied!

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

PK
Povilas Korop ✓ Link copied!

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

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.