Skip to content

Commit

Permalink
Clarify documentation on CustomIncludes [MA-150]
Browse files Browse the repository at this point in the history
  • Loading branch information
zachgarwood committed Dec 4, 2023
1 parent e703c39 commit 50cd21b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Models/Transformers/CustomIncludes.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* Usage:
* protected $customIncludes = [
* 'some_data' => DifferentSerializer::class,
* 'related_models' => DifferentSerializer::class,
* ];
*
* public function transform($model)
Expand All @@ -21,9 +21,9 @@
* ]);
* }
*
* protected includeSomeData($models)
* protected includeRelatedModels($models)
* {
* return $this->collection($models, new ModelTransformer(), 'optional_key');
* return $this->collection($models->related_models, new ModelTransformer(), 'optional_key');
* }
*/
trait CustomIncludes
Expand Down

0 comments on commit 50cd21b

Please sign in to comment.