laravel spatie asigne role
$role->givePermissionTo($permission);
$permission->assignRole($role);
laravel spatie asigne role
$role->givePermissionTo($permission);
$permission->assignRole($role);
create role spatie
// Create a role or permission if necessary
use Spatie\Permission\Models\Role;
use Spatie\Permission\Models\Permission;
$role = Role::create(['name' => 'writer']);
$permission = Permission::create(['name' => 'edit articles']);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us