Beispiel #1
0
 public function getIndex()
 {
     $pireps = Pirep::fromAirline()->get();
     $failedPireps = Pirep::fromAirline()->where('status', '=', 'failed')->get();
     return view('staff.pireps.dashboard', ['pireps' => $pireps, 'failedPireps' => $failedPireps]);
 }
Beispiel #2
0
 /**
  * Bind data to the view.
  *
  * @param  View  $view
  * @return void
  */
 public function compose(View $view)
 {
     // Count airline PIREPs
     $totalPirepsCount = Pirep::fromAirline()->count();
     $view->with('airlinePirepsCount', $totalPirepsCount);
 }