/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { $categories = ForumCategories::all(); $categorie = ForumCategories::where('slug', $id)->first(); foreach ($categorie->subjects as $subject) { Date::setLocale('fr'); $date = new Date($subject->created); $subject->when = $date->format('j F Y'); } return view('forum.categorie.show', ['categorie' => $categorie]); }
public function forum() { $categories = ForumCategories::all(); return view('page/forum', ["categories" => $categories]); }