database/seeders/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('admins')->insert([
            'name' => "eShopKH",
            'password' => Hash::make('123456789'),
            'created_at' => date('Y-m-d H:i:s'),
            'updated_at' => date('Y-m-d H:i:s')
        ]);
    }
public function run ( ) { DB :: table ( 'admins' ) -> insert ( [ 'name' => " eShopKH " , 'password' => Hash :: make ( '123456789' ) , 'created_at' => date ( 'Y-m-d H:i:s' ) , 'updated_at' => date ( 'Y-m-d H:i:s' ) ] ) ; }
Seed the application's database.
Seed the application ' s database .
// \App\Models\User::factory(10)->create(); // for($i = 0; $i < 10; $i++) // { //     DB::table('product_collection')->insert([ //         'collection_id' => 1, //         'product_id' => 10 + $i*7, //         'created_at' => date('Y-m-d H:i:s'), //         'updated_at' => date('Y-m-d H:i:s') //     ]); // } // DB::table('collections')->insert([ //     'name' => "January's Best Collection", //     'image' => 'https://images.pexels.com/photos/7130469/pexels-photo-7130469.jpeg?cs=srgb&dl=pexels-gradienta-7130469.jpg&fm=jpg', //     'created_at' => date('Y-m-d H:i:s'), //     'updated_at' => date('Y-m-d H:i:s') // ]);