AB
Size: a a a
AB
AP
D
AB
AB
AB
AP
AB
AP
AP
AB
AP
AP
AP
AB
AP
public function toArray($request)}
{
return [
'id' => $this->id,
'name' => $this->name,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
// return parent::toArray($request);
}
SG
AP
class UserCollection extends ResourceCollection
{
/**
* Transform the resource collection into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'data' => $this->collection,
'links' => [
'self' => 'link-value',
],
];
}
}
AB
AB