database/seeders/insertaralumnos.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        DB::table('alumnos')->truncate();
        DB::table('alumnos')->insert([
            'nombre' => 'Toni',
            'apellidos' => 'Galmes',
            'dni' => '41522030S',
        ]);
        DB::table('alumnos')->insert([
            'nombre' => 'Pere',
            'apellidos' => 'Galmes',
            'dni' => '41522030T',
        ]);
        DB::table('alumnos')->insert([
            'nombre' => 'Xavi',
            'apellidos' => 'Galmes',
            'dni' => '41522030U',
        ]);
    }
public function run ( ) { DB :: table ( 'alumnos' ) -> truncate ( ) ; DB :: table ( 'alumnos' ) -> insert ( [ 'nombre' => 'Toni' , 'apellidos' => 'Galmes' , 'dni' => '41522030S' , ] ) ; DB :: table ( 'alumnos' ) -> insert ( [ 'nombre' => 'Pere' , 'apellidos' => 'Galmes' , 'dni' => '41522030T' , ] ) ; DB :: table ( 'alumnos' ) -> insert ( [ 'nombre' => 'Xavi' , 'apellidos' => 'Galmes' , 'dni' => '41522030U' , ] ) ; }
Run the database seeds.
Run the database seeds .
//