mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
33 lines
652 B
PHP
33 lines
652 B
PHP
|
<?php
|
||
|
|
||
|
|
||
|
namespace App\Http\Resources\V4;
|
||
|
|
||
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||
|
|
||
|
class GenreCollection extends ResourceCollection
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
* The resource that this resource collects.
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
public $collects = 'App\Http\Resources\V4\GenreResource';
|
||
|
|
||
|
/**
|
||
|
* 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',
|
||
|
],
|
||
|
];
|
||
|
}
|
||
|
}
|