pirepRepo = $pirepRepo; } /** * Show the application dashboard. */ public function index() { $last_pirep = null; $user = Auth::user(); try { $last_pirep = $this->pirepRepo->find($user->last_pirep_id); } catch (\Exception $e) { } return view('dashboard.index', [ 'user' => $user, 'last_pirep' => $last_pirep, ]); } }