public function run() { $faker = Faker::create('es_ES'); for ($i = 0; $i < 5; $i++) { $proveedor = Proveedor::create(['nombre' => $faker->company, 'direccion' => $faker->address, 'telefono' => $faker->phoneNumber]); } }
/** * Store a newly created resource in storage. * * @return Response */ public function store(Request $request) { //$this->validate($request, ['name' => 'required']); // Uncomment and modify if needed. Proveedor::create($request->all()); return redirect('proveedor'); }