/**
  * Display options for filtering attendance list.
  *
  * @return Response
  */
 public function showFilterOptions()
 {
     $sites = Site::where('id', '>', 1)->get()->lists('code', 'id')->toArray();
     $trades = Trade::all()->lists('name', 'id')->toArray();
     array_unshift($trades, "");
     //dd($trades);
     return view('pages.filteroptions', compact('sites', 'trades'));
 }
Esempio n. 2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $labor = Labor::where('employee_no', '=', $id)->first();
     $trades = Trade::all()->lists('name', 'id')->toArray();
     $sites = Site::all()->lists('code', 'id')->toArray();
     //dd($trades);
     return view('pages.edit_labor', compact('labor', 'sites', 'trades'));
 }
Esempio n. 3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $trades = Trade::all();
     return view('pages.index_trade', compact('trades'));
 }