Blog and Articles
Blog is managed by Admin panel, you can create, edit, delete and reorder blog posts.
To display blog posts on the website, you can use BlogController
BlogController
public function index() { $articles = Article::with('user')->active()->latest()->get(); return ArticleResource::collection($articles); }
To display a single blog post, you can use show method
show
public function show(Article $article) { abort_if(!$article->active, 404); return new ArticleResource($article); }