コード例 #1
0
 /**
  * Show the form for editing the specified Publication.
  *
  * @param  int $facultyId
  * @param  int  $id
  * @return Response
  */
 public function edit($facultyId, $id)
 {
     $publication = Publication::with(['faculty', 'researchArea'])->find($id);
     $facultyName = Faculty::find($facultyId)->name;
     $researchAreaList = ResearchArea::lists('name', 'id')->all();
     $typeList = ['journal' => 'Journal', 'conference' => 'Conference'];
     return view('admin.faculty.publication.edit', compact('facultyId', 'facultyName', 'researchAreaList', 'typeList', 'publication'));
 }
コード例 #2
0
 /**
  * Display the specified Conference.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $active = 'research';
     $conference = Publication::with(['researchArea', 'faculty'])->where('type', 'conference')->findOrFail($id);
     return view('frontend.conference.show', compact('active', 'conference'));
 }