コード例 #1
0
 /**
  * Show dashboard
  * 
  * @return Response
  */
 public function index()
 {
     $faculty = Faculty::count();
     $researchGroup = ResearchGroup::count();
     $researchArea = ResearchArea::count();
     $news = News::count();
     return view('admin.pages.dashboard', compact('faculty', 'researchGroup', 'researchArea', 'news'));
 }
コード例 #2
0
 /**
  * Remove the specified ResearchGroup from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $researchGroup = ResearchGroup::find($id);
     $researchGroup->delete();
     Flash::success('Research group deleted successfully.');
     return redirect('/admin/research_group');
 }
コード例 #3
0
 /**
  * Display the specified ResearchGroup.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $active = 'research';
     $researchGroup = ResearchGroup::with('coOrdinator')->findOrFail($id);
     return view('frontend.research_group.show', compact('active', 'researchGroup'));
 }