public function update($request, $id) { // Find post $post = Post::where('post_type', 'post')->where('id', $id)->first(); // Save new post $post = Post::savePost($request, $post); if ($request->get('remove_feature_image')) { $post->feature_image = ''; $post->save(); } // Save new tags PostTag::saveTags($request->get('tags'), $post, 'tag'); // Save new category PostTag::saveBundle($request->get('category'), $post, 'category'); // Save new post meta PostMeta::saveBundle($post->id, $request->get('meta')); return $post; }