amazon-dash-button/database/seeds/DatabaseSeeder.php
/**
     * Seed the application's database.
     *
     * @return void
     */
Seed the application's database.
@return void
Seed the application ' s database . @return void
public function run()
    {
        DB::table('users')->insert([
            'email' => 'pierre-yves@zenaton.com',
            'name' => 'Pierre-Yves',
            'password' => Hash::make('secret'),
            'created_at' => DB::raw('CURRENT_TIMESTAMP'),
            'updated_at' => DB::raw('CURRENT_TIMESTAMP'),
        ]);
        DB::table('products')->insert([
            'name' => 'Beer x24',
            'price' => 1999,
            'currency' => 'EUR',
            'created_at' => DB::raw('CURRENT_TIMESTAMP'),
            'updated_at' => DB::raw('CURRENT_TIMESTAMP'),
        ]);
    }
public function run ( ) { DB :: table ( 'users' ) -> insert ( [ 'email' => 'pierre-yves@zenaton.com' , 'name' => 'Pierre-Yves' , 'password' => Hash :: make ( 'secret' ) , 'created_at' => DB :: raw ( 'CURRENT_TIMESTAMP' ) , 'updated_at' => DB :: raw ( 'CURRENT_TIMESTAMP' ) , ] ) ; DB :: table ( 'products' ) -> insert ( [ 'name' => 'Beer x24' , 'price' => 1999 , 'currency' => 'EUR' , 'created_at' => DB :: raw ( 'CURRENT_TIMESTAMP' ) , 'updated_at' => DB :: raw ( 'CURRENT_TIMESTAMP' ) , ] ) ; }
Seed the application's database.
Seed the application ' s database .
// $this->call(UsersTableSeeder::class); // Create just one user // Create just one product