0

I am using a Package for roles and permissions management in my laravel 5.1 application and getting error while trying to create roles by using following code.

<?php

use Bican\Roles\Models\Role;

use Illuminate\Database\Seeder;

class RoleTableSeeder extends Seeder
{
public function run()
{
$adminRole = Role::create([
'name' => 'Admin',
'slug' => 'admin',
'description' => '', // optional
'level' => 1, // optional, set to 1 by default
]);
}
}

and I am seeding it using following command on CLI.

php artisan db:seed --class=RoleTableSeeder

but unfortunately I am getting ReflectionException

"[ReflectionException] Class RoleTableSeeder does not exist"...

What might be wrong with it? Looking for your help...

Link to Package: https://github.com/romanbican/roles

user2094178
  • 9,204
  • 10
  • 41
  • 70
Hassan Saqib
  • 2,597
  • 7
  • 28
  • 51

1 Answers1

0

Problem solved using the following command on CLI.

composer dump-autoload

Acknowledged: Package Owner

Hassan Saqib
  • 2,597
  • 7
  • 28
  • 51