<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

class DriverSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $drivers =
        [
            [
                'iddoc'         => 2,
                'dni_ruc'       => '70989910',
                'nombres'       => 'CHRISTIAN BARTRA',
                'direccion'     => 'JR PERU 555',
                'codigo_pais'   => 'PE',
                'ubigeo'        => '220902',
                'telefono'      => '',
                'placa'         => 'A21-PX5'
            ]
        ];

        foreach($drivers as $driver)
        {
            $new_driver     = new \App\Models\Driver();
            foreach($driver as $k => $value)
            {
                $new_driver->{$k} = $value;
            }

            $new_driver->save();
        }
    }
}
