/** * 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)); }
/** * 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)); }