Format_areaTableSeeder.php 820 Bytes
<?php

namespace Database\Seeders;

use App\Models\format_area;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Seeder;

class Format_areaTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $data = [
            /*1 */[
                'name_format' => 'Аптека',
            ],
            /*2*/[
                'name_format' => 'Супермаркет',
            ],
            /*3*/[
                'name_format' => 'Барбершоп',
            ],
        ];

        foreach ($data as $item) {
            $albom = new format_area();
            $albom->name_format = $item['name_format'];
            $albom->save();
        }
    }
}