Laravel.
Устанавливаю
Laravel Roles
Как мне исправить ошибку?
Сама ошибка
ReflectionException : Class PermissionsTableSeeder does not exist
Файл DatabaseSeeder
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class DatabaseSeeder extends Seeder
{
public function run()
{
Model::unguard();
$this->call('PermissionsTableSeeder');
$this->call('RolesTableSeeder');
$this->call('ConnectRelationshipsSeeder');
Model::reguard();
}
}
Файл PermissionsTableSeeder
namespace Database\Seeds;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Seeder;
class PermissionsTableSeeder extends Seeder
{
public function run()
{
$Permissionitems = [
[
'name' => 'Can View Users',
'slug' => 'view.users',
'description' => 'Can view users',
'model' => 'Permission',
],
[
'name' => 'Can Create Users',
'slug' => 'create.users',
'description' => 'Can create new users',
'model' => 'Permission',
],
[
'name' => 'Can Edit Users',
'slug' => 'edit.users',
'description' => 'Can edit users',
'model' => 'Permission',
],
[
'name' => 'Can Delete Users',
'slug' => 'delete.users',
'description' => 'Can delete users',
'model' => 'Permission',
],
];
foreach ($Permissionitems as $Permissionitem) {
$newPermissionitem = config('roles.models.permission')::where('slug', '=', $Permissionitem['slug'])->first();
if ($newPermissionitem === null) {
$newPermissionitem = config('roles.models.permission')::create([
'name' => $Permissionitem['name'],
'slug' => $Permissionitem['slug'],
'description' => $Permissionitem['description'],
'model' => $Permissionitem['model'],
]);
}
}
}
}