Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

spatie give permissionto and assign role

// Adding permissions to a user
$user->givePermissionTo('edit articles');

// Adding permissions via a role
$user->assignRole('writer');

$role->givePermissionTo('edit articles');
Source by github.com #
 
PREVIOUS NEXT
Tagged: #spatie #give #permissionto #assign #role
ADD COMMENT
Topic
Name
2+1 =