// Create a role or permission if necessary use SpatiePermissionModelsRole; use SpatiePermissionModelsPermission; $role = Role::create(['name' => 'writer']); $permission = Permission::create(['name' => 'edit articles']);