79073694

Date: 2024-10-10 09:35:47
Score: 1
Natty:
Report link

When you use $request->user()->can('view', $Permission), it will try to find a policy assigned to the Permission model (eg. App\Policies\PermissionPolicy).

To make things simple, you should create a PermissionPolicy class and move the view method to that class.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When you use
  • Low reputation (0.5):
Posted by: Luca Puddu