/** * Display the focus selection * * @param string $ageGroup Age group slug * * @return Response */ public function focus($ageGroup) { if (AgeGroup::where('slug', $ageGroup)->count() < 1) { return redirect()->route('home'); } return view('home.focus')->with('ageGroup', $ageGroup)->withFoci(Focus::all()); }
/** * Show the form for editing the specified resource. * * @param int $id Resource ID * * @return Response */ public function edit($id) { return view('admin.principle.edit')->withPrinciple(Principle::findOrFail($id))->withFoci(Focus::all()); }
/** * Display a listing of the resource. * * @return Response */ public function index() { return view('admin.focus.index')->withFoci(Focus::all()); }