コード例 #1
0
ファイル: RodeosController.php プロジェクト: iarmoa/gaia
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $rodeos = Rodeos::paginate(10);
     //print_r($animales); die();
     $potreros = Potreros::get()->all();
     $users = User::get()->all();
     return view('rodeos.index', ['rodeos' => $rodeos, 'potreros' => $potreros, 'users' => $users]);
 }
コード例 #2
0
ファイル: BajasController.php プロジェクト: iarmoa/gaia
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function today()
 {
     $bajas = \DB::table('bajas')->select('id', 'fecha', 'rodeo_id', 'animal_id', 'motivo')->where('fecha', '=', date('Y-m-d'))->get();
     $potreros = Potreros::get()->all();
     $rodeos = Rodeos::get()->all();
     $caravanas = Animales::get()->all();
     return view('bajas.today', ['bajas' => $bajas, 'potreros' => $potreros, 'rodeos' => $rodeos, 'caravanas' => $caravanas]);
 }
コード例 #3
0
ファイル: PotrerosController.php プロジェクト: iarmoa/gaia
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Potreros::destroy($id);
     return redirect()->route('potreros.index');
 }
コード例 #4
0
ファイル: AnimalesController.php プロジェクト: iarmoa/gaia
 public function today()
 {
     $animales = \DB::table('animales')->select('id', 'caravana', 'potrero_id', 'raza', 'peso_nacimiento', 'fecha_nacimiento', 'sexo', 'estado')->where('fecha_nacimiento', '=', date('Y-m-d'))->get();
     $potreros = Potreros::get()->all();
     return view('animales.today', ['animales' => $animales, 'potreros' => $potreros]);
 }