gregorip02 / restql

📦 A data resolution package for your Laravel models.
https://github.com/gregorip02/restql/wiki
GNU General Public License v3.0
129 stars 6 forks source link

How to exclude a field from the request if the user does not have enough rights to access this field or if the condition is not met? #11

Closed zabavnikov closed 4 years ago

gregorip02 commented 4 years ago

Hi @zabavnikov

Trying to solve this, I developed a new function available in the trait Restql\Traits\RestqlAttributes with which you can establish a list of "selectable" attributes.

Update to version 2.2 using composer update gregorip02/restql.

Hope this works, let me know and we will close this issue.

gregorip02 commented 4 years ago

https://github.com/gregorip02/restql/releases/tag/v2.2.0

gregorip02 commented 4 years ago

Closing by inactivity...