public function editPost($id)
 {
     $category = Category::all();
     $post = Post::find($id);
     $cate = explode(',', $post->category);
     $publishers = Publisher::orderBy('name', 'ASC')->get();
     return View::make('contributor.editPost')->with('title', "Posts Management")->with('page', "posts")->with('category', $category)->with('post', $post)->with('cate', $cate)->with('publishers', $publishers);
 }
 public function editPost($id)
 {
     $category = Category::all();
     $post = Post::find($id);
     $cate = explode(',', $post->category);
     $authors = User::where('is_activated', 1)->get();
     $publishers = Publisher::orderBy('name', 'ASC')->get();
     return View::make('moderate.editPost')->with('title', "Posts Management")->with('page', "posts")->with('category', $category)->with('post', $post)->with('cate', $cate)->with('authors', $authors)->with('publishers', $publishers);
 }
 public function editPost($id)
 {
     $check_con = 1;
     $category = Category::all();
     $post = Post::find($id);
     $check_role = get_user_details($post->user_id);
     if ($check_role->role_id == 3 && $post->is_approved == 0) {
         $check_con = 1;
     }
     $authors = User::where('is_activated', 1)->get();
     $publishers = Publisher::orderBy('name', 'ASC')->get();
     $cate = explode(',', $post->category);
     return View::make('admin.editPost')->with('title', "Posts Management")->with('page', "posts")->with('authors', $authors)->with('contributor', $check_con)->with('category', $category)->with('post', $post)->with('cate', $cate)->with('publishers', $publishers);
 }