Closed
Description
Is any type of return properties list supported or we should execute an example request to be able to see the response format ?
I am using ...Resource classes (something like below) to be returned from each controller method response so the returned keys could be extracted the same way as they are for Request classes:
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class ClientResource extends JsonResource
{
public function toArray($request): array
{
return [
'id' => $this->id,
'displayName' => $this->display_name,
];
}
}
Metadata
Metadata
Assignees
Labels
No labels