Ejemplo n.º 1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Requests\CreateSpeciesRequest $request)
 {
     //must validate before species is created in DB
     \App\Species::create($request->all());
     \App\Species::reindex();
     return redirect('species');
 }
Ejemplo n.º 2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::create(['name' => 'Vlada', 'email' => '*****@*****.**', 'password' => bcrypt('123123')]);
     Species::create(['name' => 'Shark']);
     Species::create(['name' => 'Swordfish']);
     Species::create(['name' => 'Tuna']);
     // $this->call(UserTableSeeder::class);
 }
Ejemplo n.º 3
0
 public function saveSettings(Request $request)
 {
     Species::create($request->all());
     $species = Species::all();
     return view('dash.settings')->with(['species' => $species]);
 }
Ejemplo n.º 4
0
 public function store(SpecieRequest $request)
 {
     $data = $request->all();
     Species::create($data);
     return redirect()->router('species');
 }