dingo / dingo/api

$appends variables function got additional 3 times execution

Open
#1,797 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
9.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

| 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.