<?php

namespace Database\Seeders;

use App\Models\SettingManagement\Status;
use Illuminate\Database\Seeder;

class StatusSeeder extends Seeder{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run(){

        $statuses = config('statuses');

      //  dd($statuses);
        //Status::upsert($statuses,['code']);
        foreach($statuses as $status) {
            Status::updateOrCreate(['code' => $status['code']], $status);
          //  echo(__(":name OK!\n",["name" => $status['name']]));
        }

        echo __("All Statuses Created!\n\n");
    }
}
