database/seeders/RoleTableSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $roles = [
            'admin',
            'donatur'
        ];
        collect($roles)->map(function ($name) {
            Role::query()
                ->updateOrCreate(compact('name'), compact('name'));
        });
    }
public function run ( ) { $ roles = [ 'admin' , 'donatur' ] ; collect ( $ roles ) -> map ( function ( $ name ) { Role :: query ( ) -> updateOrCreate ( compact ( 'name' ) , compact ( 'name' ) ) ; } ) ; }
Run the database seeds.
Run the database seeds .