database/seeds/DecorCategoryTableSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        DB::table('decor_categories')->truncate();
        $categories = [
            ['name' => 'Премиум +', 'coast' => 4500 ],
            ['name' => 'Премиум', 'coast' => 3940 ],
            ['name' => 'Универсал', 'coast' => 1870 ],
            ['name' => 'Классик', 'coast' => 3880 ],
        ];
        foreach ($categories as $category){
            \App\DecorCategory::create([
                'name' => $category['name'],
                'coast' => $category['coast']
            ]);
        }
    }
public function run ( ) { DB :: table ( 'decor_categories' ) -> truncate ( ) ; $ categories = [ [ 'name' => 'Премиум +', 'coas t  => 450  ] [ 'name' => 'Премиум', 'coas t  => 394  ] [ 'name' => 'Универсал', 'coast' > 1870  , [ 'name' => 'Классик', 'coas t  => 388  ] ] ; foreach ( $ categories as $ category ) { \ App \ DecorCategory :: create ( [ 'name' => $ category [ 'name' ] , 'coast' => $ category [ 'coast' ] ] ) ; } }
Run the database seeds.
Run the database seeds .