Skip to content

Commit

Permalink
Implement Fractal's ParseIncludes method
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksamson committed Sep 6, 2015
1 parent 258be75 commit 15f5eda
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ApiResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ public function fromModelInstance($model, $transformer)
{
$resource = new Item($model, new $transformer);

if ($this->include != null) {
$this->fractal->parseIncludes($this->include);
}

return $this->fractal->createData($resource)->toArray();
}

Expand Down

0 comments on commit 15f5eda

Please sign in to comment.