Пример #1
0
 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]);
     }
 }
Пример #2
0
 /**
  * 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');
 }