We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b76bed commit c08e0f2Copy full SHA for c08e0f2
src/Events/PermissionDetached.php
@@ -18,9 +18,11 @@ class PermissionDetached
18
use SerializesModels;
19
20
/**
21
- * @param Model $model
22
- * @param Permission|Permission[]|Collection $permission
+ * Internally the HasPermissions trait passes $permissionsOrIds as an Eloquent record.
+ * Theoretically one could register the event to other places and pass an array etc.
23
+ * So a Listener should inspect the type of $permissionsOrIds received before using.
24
+ *
25
+ * @param array|int[]|string[]|Permission|Permission[]|Collection $permissionsOrIds
26
*/
- public function __construct(public Model $model, public mixed $permission)
- {}
27
+ public function __construct(public Model $model, public mixed $permissionsOrIds) {}
28
}
0 commit comments