jikan-rest/app/Http/Resources/V4/GenreCollection.php
pushrbx a145f18bbd wip - major refactor
- AppServiceProvider is needs more work to wire in new services
- todo: more dtos
- todo: add unit tests
- todo: add more integration tests
2023-05-21 11:14:34 +01:00

43 lines
903 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
*
* @OA\Schema(
* schema="genres",
* description="Genres Collection Resource",
*
* @OA\Property(
* property="data",
* type="array",
* @OA\Items(
* type="object",
* ref="#/components/schemas/genre"
* ),
* ),
* )
*/
public function toArray($request)
{
return $this->collection;
}
}