Replies: 1 comment 3 replies
-
You mean this if? That allows two input formats: |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can someone explain to me why we have
if
s in ArrayableTrait::resolveFields()?To not throw when user requested via RESTful API non-existent fields? Why do we use keys in $this->fields() and $this->extraFields() then? Cause at the moment in current code they'll never pass these
if
checks.In the beginning I thought it was designed to use aliases for
toArray()
function. Like return ["title"=>"name"]; So we receive result array looking like ["title" => <value of thename
attribute>].Please, enlighten me.
P.S. By the way if we have "*" in the
fields()
method, it'll throw Exception, thou I assume it should not.Beta Was this translation helpful? Give feedback.
All reactions