public function update($slug, ArticleRequest $request) { $article = Article::WithSlug($slug); $article->updated_at = Carbon::now(); $article->update($request->all()); flash()->success('Success!', 'Your article has been updated'); return redirect(sprintf('/articles/%s', $slug)); }
public function home() { $photos = Photo::recent(); $article = Article::recent(); return view('pages.home', compact('photos', 'article')); }
public function index() { $albums = Album::get(); $articles = Article::get(); return view('mod.dashboard', compact('albums', 'articles')); }