You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The specification states that we able to fetch records using the TYPE and ID. Together, these two things uniquely identify the record in our API. The URL we are following:
GET: <HOST>/<API_NAMESPACE>/<TYPE>/<ID>
It's fine because the record exists in the table, and it's can loaded with defined fields in the schema.
public function fields(): array
{
return [
ID::make(),
Str::make('name')->sortable(),
Str::make('email')->sortable(),
Str::make('phone')->sortable(),
...
]
}
I want to load these fields when fetching resources with default value for the new record. Maybe something like the URL could be below. new is the static value:
So, We can keep the single-way attribute handling on both new and existing records. We just use attributes from the server side. Right now, we need to define statically attributes for the new record resource and for the existing record we can use directly from these fields.
The text was updated successfully, but these errors were encountered:
Hi. The purpose of this package is to implement the specification. What you are proposing is not in the specification, therefore cannot be added by this package.
You can of course implement this yourself, and if you want to make it available to others, then you could publish it as a package.
The specification states that we able to fetch records using the
TYPE
andID
. Together, these two things uniquely identify the record in our API. The URL we are following:It's fine because the record exists in the table, and it's can loaded with defined
fields
in the schema.I want to load these fields when fetching resources with default value for the new record. Maybe something like the URL could be below.
new
is the static value:Response could be like:
So, We can keep the single-way attribute handling on both new and existing records. We just use attributes from the server side. Right now, we need to define statically attributes for the new record resource and for the existing record we can use directly from these
fields
.The text was updated successfully, but these errors were encountered: