Ejemplo n.º 1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $categories = Category::all();
     $article = Article::findOrFail($id);
     return view('easy.Admin.articles.edit', compact('categories', 'article'));
     //return view('easy.Admin.articles.edit')->withArticle(Article::find($id));
 }
Ejemplo n.º 2
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     return view('easy.Application.articles.show')->withArticle(Article::findOrFail($id));
 }