database/seeds/UserTableSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $user = User::create([
            'name' => 'Jérôme',
            'email' => 'test@test.com',
            'password' => Hash::make('000000')
        ]);
        $user->roles()->sync([2]);
    }
public function run ( ) { $ user = User :: create ( [ 'name' => 'Jérôme', 'email' => 'test@test.com' , 'password' => Hash :: make ( '000000' ) ] ) ; $ user -> roles ( ) -> sync ( [ 2 ] ) ; }
Run the database seeds.
Run the database seeds .
// name, email, password // On ajoute le role