Skip to content

Commit

Permalink
use config for transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
nivv committed Jun 13, 2024
1 parent 339d0ce commit f55f143
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Http/Controllers/Api/Fabriq/ArticleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public function index(Request $request): JsonResponse

public function show(Request $request, int $id): JsonResponse
{
$eagerLoad = $this->getEagerLoad(Article::RELATIONSHIPS);
$article = Article::where('id', $id)
$eagerLoad = $this->getEagerLoad(Fabriq::getFqnModel('article')::RELATIONSHIPS);
$article = Fabriq::getFqnModel('article')::where('id', $id)
->with($eagerLoad)
->firstOrFail();

Expand Down

0 comments on commit f55f143

Please sign in to comment.