Exemplo n.º 1
0
 public function showPastAuditions()
 {
     $auditionsStatuses = AuditionStatus::where('user_id', Auth::user()->id)->get();
     $auditions = collect();
     foreach ($auditionsStatuses as $audition) {
         $audition_details = Audition::find($audition->audition_id);
         if ($audition_details->ended) {
             $audition_details->status = $audition;
             $audition_details->notes = Note::where('audition_status_id', $audition->id)->get();
             $auditions->push($audition_details);
         }
     }
     return view('past', ['auditions' => $auditions]);
 }
 public function reject($id, $uid)
 {
     $auditioner = AuditionStatus::where('audition_id', $id)->where('user_id', $uid)->first();
     $auditioner->status = false;
     $auditioner->save();
     return redirect()->route('live', [$id]);
 }