Esempio n. 1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $pigeon = Pigeon::findOrFail($id);
     $pigeon->name = $request->input('name');
     $pigeon->union_number = $request->input('union_number');
     $pigeon->ring_number = $request->input('ring_number');
     $pigeon->breeder = $request->input('breeder');
     $pigeon->country = $request->input('country');
     $pigeon->sex = $request->input('sex');
     $pigeon->year = $request->input('year');
     $pigeon->race = $request->input('race');
     $pigeon->color = $request->input('color');
     $pigeon->info = $request->input('info');
     $pigeon->father = $request->input('father');
     $pigeon->mother = $request->input('mother');
     $pigeon->save();
     return redirect(action('PigeonController@show', [$id]));
 }
Esempio n. 2
0
 public function preview($id)
 {
     $pigeon = Pigeon::findOrFail($id);
     return view('bloodline.bloodline', ['pigeon' => $pigeon]);
 }