Skip to content

Commit

Permalink
fix(ArticleController): show author in show method
Browse files Browse the repository at this point in the history
  • Loading branch information
mochenski committed Jul 15, 2020
1 parent 108725f commit 7ce89d1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions back-end/app/Http/Controllers/api/ArticleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ public function store(Request $request)
*/
public function show($slug)
{
$article = Article::where('slug', $slug)->first();
$article->tags;
$article = Article::where('slug', $slug)->with('tags', 'author')->first();

if (!$article)
return response([
Expand Down

0 comments on commit 7ce89d1

Please sign in to comment.