$appends variables function got additional 3 times execution
Author: mahadi-siregarCreated Jan 27, 2022Updated Jan 27, 2022
| Q | A |
|---|---|
| Bug? | yes |
| New Feature? | no |
| Framework | Laravel |
| Framework version | 5.5.y & ^8.0 |
| Package version | v2.0.0-alpha1 & ^3.0 |
| PHP version | 7.x.y |
Actual Behaviour
get{$Variable}Attribute of $appends variable on the eloquent model got 3 times additional execution when the response returned using single item response function (return $this->response->item)
Steps to Reproduce
- add $appends variable on the model
- write a log on the get{$Variable}Attribute function and the log will written 3 times for each item
Source: dingo/api