<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

use function PHPSTORM_META\map;

class OriginSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $origins     =
        [
            [
                'direccion'        => 'JR SAN MARTIN 2020',
                'iddistrito'       => 1763
            ],
            [
                'direccion'        => 'JR ALFONSO UGARTE 1011',
                'iddistrito'       => 1798
            ],
        ];

        foreach($origins as $origin)
        {
            $new_origin  = new \App\Models\Origin();
            foreach($origin as $k => $value)
            {
                $new_origin->{$k}    = $value;
            }

            $new_origin->save();
        }
    }
}
