public function edit($post_id) { $post = Posts::with('tags')->find($post_id); $data = ['categories' => Categories::all(), 'post' => $post, 'title' => $post->id . ' : Edit Post', 'save_url' => route('root-posts-store', ['post_id' => $post_id]), 'tags' => Tags::all()]; $this->title->prepend($data['title']); View::share('menu_item_active', 'posts'); return view('root.posts.post', $data); }
public function edit($post_id) { $post = Posts::with('tags')->find($post_id); Title::prepend('Edit Post'); Title::prepend($post->id); $data = ['categories' => Categories::all(), 'post' => $post, 'title' => Title::renderr(' : ', true), 'save_url' => route('root-posts-store', ['post_id' => $post_id]), 'tags' => Tags::all()]; View::share('menu_item_active', 'posts'); return view('root.posts.post', $data); }
public function index() { $data = Posts::with('postUser')->with('postCate')->paginate(); return $this->render('Admin/Post/index', array('list' => $data)); }