We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi.
First, let me say - great idea with filters. Looks nice.
How would you go about show/hide accessor data or some other custom data derivative?
Lets use simple User example.
// accessor public function getFullNameAttribute() { return $this->first_name . ' ' . $this->last_name; } public function getAgeAttribute() { return Carbon::parse($this->attributes['birthday'])->age; }
I would like to allow user to toggle some fields that are not stored in model
/users?with=full_name,age
I have implemented a solution based on JsonResource and with custom mergeWhen logic but I would like to hear your input with EloquentBuilder.
JsonResource
mergeWhen
EloquentBuilder
I know about appends - but I do not want to always include that data in all responses.
appends
protected $appends = ['age'];
The text was updated successfully, but these errors were encountered:
@hrvoj3e I believe you're talking about how to present your data (using accessors) and this is out of the scope of this package.
Sorry, something went wrong.
50bhan
No branches or pull requests
Hi.
First, let me say - great idea with filters. Looks nice.
How would you go about show/hide accessor data or some other custom data derivative?
Lets use simple User example.
I would like to allow user to toggle some fields that are not stored in model
I have implemented a solution based on
JsonResource
and with custommergeWhen
logic but I would like to hear your input withEloquentBuilder
.I know about
appends
- but I do not want to always include that data in all responses.The text was updated successfully, but these errors were encountered: