File "StoreLocationStateSeeder.php"

Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/database/seeders/StoreLocationStateSeeder.php
File size: 674 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Database\Seeders;

use App\Models\StoreLocation;
use FontLib\Table\Type\loca;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class StoreLocationStateSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $location_one = StoreLocation::find(1);
        $location_two = StoreLocation::find(2);

        if ($location_one){
            $location_one->state_id = 1;
            $location_one->save();
        }

        if ($location_two){
            $location_two->state_id = 5;
            $location_two->save();
        }
    }
}