<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

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

        foreach($destinations as $destination)
        {
            $new_destination  = new \App\Models\Destination();
            foreach($destination as $k => $value)
            {
                $new_destination->{$k}    = $value;
            }

            $new_destination->save();
        }
    }
}
