Skip to content

Commit

Permalink
Update ShowCategoryController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincrozat authored Oct 16, 2023
1 parent cc250fc commit 02ce105
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Http/Controllers/ShowCategoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public function __invoke(string $slug) : View
{
$category = Categories::get($slug);

abort_if(is_null($category), 404);

return view('categories.show', compact('category') + [
'posts' => Categories::posts($category),
]);
Expand Down

0 comments on commit 02ce105

Please sign in to comment.