database/seeds/ColorsTableSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
         DB::table('colors')->insert([
            'name' => 'red'
        ]);
         DB::table('colors')->insert([
            'name' => 'green'
        ]);
         DB::table('colors')->insert([
            'name' => 'blue'
        ]);
         DB::table('colors')->insert([
            'name' => 'violet'
        ]);
    }
public function run ( ) { DB :: table ( 'colors' ) -> insert ( [ 'name' => 'red' ] ) ; DB :: table ( 'colors' ) -> insert ( [ 'name' => 'green' ] ) ; DB :: table ( 'colors' ) -> insert ( [ 'name' => 'blue' ] ) ; DB :: table ( 'colors' ) -> insert ( [ 'name' => 'violet' ] ) ; }
Run the database seeds.
Run the database seeds .