public function training($training = null)
 {
     $this->info['namespace'] = "trainings";
     if (isset($training)) {
         $this->info['selectedTraining'] = Training::where('link', $training)->first();
     } else {
         $this->info['selectedTraining'] = "";
     }
     if (Auth::check()) {
         $this->info['logged'] = 1;
         $user_trainings = Applicant::where('user_id', Auth::user()->id)->get(['training_id']);
         foreach ($user_trainings as $user_training) {
             if ($this->info['selectedTraining']->id == $user_training->training_id) {
                 $this->info['logged'] = 2;
                 break;
             }
         }
     } else {
         $this->info['logged'] = 0;
     }
     return view('pages.training', ['info' => $this->info]);
 }