<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

class SenderSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $senders =
        [
            [
                'iddoc'         => 2,
                'dni_ruc'       => '70163063',
                'nombres'       => 'CESAR ROJAS',
                'direccion'     => 'JR LA MOLINA 555',
                'codigo_pais'   => 'PE',
                'ubigeo'        => '220902',
                'telefono'      => ''
            ]
        ];

        foreach($senders as $sender)
        {
            $new_sender     = new \App\Models\Sender();
            foreach($sender as $k => $value)
            {
                $new_sender->{$k} = $value;
            }

            $new_sender->save();
        }
    }
}
