Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel spatie asigne role

$user->assignRole('writer');

// You can also assign multiple roles at once
$user->assignRole('writer', 'admin');
// or as an array
$user->assignRole(['writer', 'admin']);
Source by spatie.be #
 
PREVIOUS NEXT
Tagged: #laravel #spatie #asigne #role
ADD COMMENT
Topic
Name
5+7 =