/** * Display the specified resource. * * @param Paper $paper * @return \Illuminate\Http\Response */ public function show(Paper $paper) { $paper->load(['criteria.langs' => function ($query) { $query->lang(); }, 'criteria.options.langs' => function ($query) { $query->lang(); }]); return view('admin.paper.show', ['paper' => $paper]); }
/** * Display the specified resource. * * @param Department $department * @param Paper $paper * @return \Illuminate\Http\Response */ public function show(Department $department, Paper $paper) { if ($paper->isAuthor() || $paper->isReviewer() || systemAccess(13)) { $paper->load(['criteria.langs' => function ($query) { $query->lang(); }, 'criteria.options.langs' => function ($query) { $query->lang(); }]); return view('conference.papers.show', ['paper' => $paper]); } return redirect()->back()->with('error', 'access-denied'); }