/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $post = \App\Model\Post::find($id); return view('post/edit')->with('type', 'update')->with('post', $post)->with('categorys', \App\Model\Option::whereType('category')->get()); }
/** * Display a listing of the resource. * * @return Response */ public function index() { return view('category/list')->with('categorys', \App\Model\Option::whereType('category')->get()); }