/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($slug, Category $category) { $cid = $category->where('id', $slug)->first(); $id = $cid->id; /* get the atributes of the category model whose id == $id */ $category = $category->whereId($id)->first(); /* get the Edit page the selected category via id */ return view('themes.default1.agent.kb.category.edit', compact('category')); }
public function getCategoryList(Article $article, Category $category, Relationship $relation) { //$categorys = $category->get(); $categorys = $category->get(); // $categorys->setPath('home'); /* direct to view with $article_id */ return view('themes.default1.client.kb.article-list.categoryList', compact('categorys', 'article_id')); }