database/seeds/CategoriesTableSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        DB::table('categories')->truncate();
        $param = [
            'name' =>'季節限定'
        ];
        DB::table('categories')->insert($param);
        $param = [
            'name' =>'人気商品'
        ];
        DB::table('categories')->insert($param);
        $param = [
            'name' =>'ロールケーキ'
        ];
        DB::table('categories')->insert($param);
        $param = [
            'name' =>'焼き菓子'
        ];
        DB::table('categories')->insert($param);
        $param = [
            'name' =>'慶弔菓子'
        ];
        DB::table('categories')->insert($param);
    }
public function run ( ) { DB :: table ( 'categories' ) -> truncate ( ) ; $ param = [ 'name' => '季節限定' ] ; DB :: table ( 'categories' ) -> insert ( $ param ) ; $ param = [ 'name' => '人気商品' ] ; DB :: table ( 'categories' ) -> insert ( $ param ) ; $ param = [ 'name' => 'ロールケーキ' ] ; DB :: table ( 'categories' ) -> insert ( $ param ) ; $ param = [ 'name' => '焼き菓子' ] ; DB :: table ( 'categories' ) -> insert ( $ param ) ; $ param = [ 'name' => '慶弔菓子' ] ; DB :: table ( 'categories' ) -> insert ( $ param ) ; }
Run the database seeds.
Run the database seeds .