allow vendord
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
This commit is contained in:
28
vendor/spatie/laravel-permission/src/Events/RoleAttached.php
vendored
Normal file
28
vendor/spatie/laravel-permission/src/Events/RoleAttached.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Spatie\Permission\Events;
|
||||
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Collection;
|
||||
use Spatie\Permission\Contracts\Role;
|
||||
|
||||
class RoleAttached
|
||||
{
|
||||
use Dispatchable;
|
||||
use InteractsWithSockets;
|
||||
use SerializesModels;
|
||||
|
||||
/**
|
||||
* Internally the HasRoles trait passes an array of role ids (eg: int's or uuid's)
|
||||
* Theoretically one could register the event to other places passing other types
|
||||
* So a Listener should inspect the type of $rolesOrIds received before using.
|
||||
*
|
||||
* @param array|int[]|string[]|Role|Role[]|Collection $rolesOrIds
|
||||
*/
|
||||
public function __construct(public Model $model, public mixed $rolesOrIds) {}
|
||||
}
|
||||
Reference in New Issue
Block a user