Beispiel #1
0
 public function getIndex()
 {
     $pireps = Pirep::fromPilot()->orderBy('created_at', 'desc')->get();
     $pireps->load(['booking' => function ($query) {
         $query->withTrashed();
         // Include "deleted" bookings
     }, 'booking.route' => function ($query) {
         $query->withTrashed();
         // Include "deleted" routes
     }, 'booking.pilot.user']);
     return view('pireps/list', ['pireps' => $pireps]);
 }