/**
  * @param Questions $questions
  * @return \Illuminate\View\View
  */
 public function edit($id)
 {
     $question = Questions::findBySlugOrFail($id);
     $tags = Tags::lists('name', 'name')->toArray();
     $courses = Courses::lists('course_name', 'id');
     return view('Question.edit', compact(['question', 'courses', 'tags']));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $post = Posts::findOrFail($id);
     $pageTitle = 'Posts';
     $pageDescription = 'Edit existing post';
     $categories = Categories::lists('name', 'id');
     $tags = Tags::lists('name', 'id');
     return view('posts.edit', compact('pageTitle', 'pageDescription', 'post', 'categories', 'tags'));
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $categories = Categories::lists('name', 'id');
     $tags = Tags::lists('name', 'id');
     return view('articles.create', compact('categories', 'tags'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $article = Articles::findOrFail($id);
     $categories = Categories::lists('name', 'id');
     $tags = Tags::lists('name', 'id');
     $selected_tags = $article->tags()->lists('id')->all();
     return view('articles.update', compact('article', 'categories', 'tags', 'selected_tags'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  Todos  $todos
  * @return \Illuminate\Http\Response
  */
 public function edit(Todos $todos)
 {
     $tags = Tags::lists('name', 'id');
     return view('todos.edit', array_merge(compact('todos'), compact('tags')));
 }