database/seeds/CreateRoles.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $roles = [
            'candidate',
            'employer'
        ];
        foreach ($roles as $role) {
            \Spatie\Permission\Models\Role::create([
                'name' => $role
            ]);
        }
    }
public function run ( ) { $ roles = [ 'candidate' , 'employer' ] ; foreach ( $ roles as $ role ) { \ Spatie \ Permission \ Models \ Role :: create ( [ 'name' => $ role ] ) ; } }
Run the database seeds.
Run the database seeds .