/**
  * Show the form for creating a new resource.
  * @return Response
  */
 public function show($rec_id)
 {
     $recordings = QuranRecording::with('student', 'subject', 'evaluator', 'student.registration', 'student.registration.files')->findOrFail($rec_id);
     // dd($recordings);
     $elements = EvaluationElement::where('state', 'نشط')->where('quran_id', $recordings->subject_id)->get();
     $notes = QuranNote::pluck('content', 'content')->toArray();
     $notes_grad = QuranNote::orderBy('grade_to')->pluck('content', 'grade_to')->toArray();
     $video = $recordings->quran_video;
     $student_id = $recordings->student->id;
     // $photo = $recordings->student->photo->first();
     // dd($recordings->student->registration);
     if ($recordings->student->registration->file) {
         $photo = $recordings->student->registration->files->first(function ($key, $file) {
             return $file->type == 'transcript';
         })->file->url('medium');
     } else {
         $photo = 'لا يوجد صورة';
     }
     // return asset($photo);
     $page = $recordings->page;
     return view('quran::quran.show', compact('recordings', 'video', 'page', 'elements', 'notes', 'rec_id', 'student_id', 'photo', 'notes_grad'));
 }