Esempio n. 1
0
 public function run()
 {
     $faker = Faker\Factory::create();
     for ($i = 0; $i < 60; $i++) {
         Child::create(['first_name' => $faker->firstNameMale, 'last_name' => $faker->lastName, 'room_id' => mt_rand(1, 5), 'daycare_id' => 1]);
     }
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $Child = \App\Child::create(Input::get());
     return response()->json(['id' => $Child->id]);
 }