mirror of https://github.com/Devoalda/LaDo.git
25 lines
509 B
PHP
25 lines
509 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
|
|
|
class ProjectResource extends ResourceCollection
|
|
{
|
|
/**
|
|
* Transform the resource collection into an array.
|
|
*
|
|
* @return array<int|string, mixed>
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'data' => $this->collection,
|
|
'links' => [
|
|
'self' => 'link-value',
|
|
],
|
|
];
|
|
}
|
|
}
|