public function listApplications()
 {
     if ($this->auth->check()) {
         if (in_array($this->auth->user()->role, ['admin'])) {
             $applications = Application::get();
         } elseif (in_array($this->auth->user()->role, ['judge', 'observer'])) {
             $applications = Application::whereIn('status', ['submitted', 'review'])->get();
         } else {
             // otherwise redirect to home page? (normal users see a list in their dashboard)
             return redirect('');
         }
         return view('pages/applications/list', compact('applications'));
     } else {
         return redirect('');
     }
 }
 public function getApplications()
 {
     $applications = Application::get();
     return view('admin.application.index')->with(compact('applications'));
 }