> ## Documentation Index
> Fetch the complete documentation index at: https://docs.larafast.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Blog

> 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`

```php BlogController.php theme={null}
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

```php BlogController.php theme={null}
public function show(Article $article)
{
    abort_if(!$article->active, 404);

    return new ArticleResource($article);
}
```
