2020-07-10 20:58:07 +05:00
|
|
|
<?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
|
2020-07-17 00:13:07 +05:00
|
|
|
*
|
|
|
|
* @OA\Schema(
|
|
|
|
* schema="genres",
|
|
|
|
* description="Genres Collection Resource",
|
|
|
|
*
|
|
|
|
* @OA\Property(
|
|
|
|
* property="data",
|
|
|
|
* type="object",
|
|
|
|
*
|
|
|
|
* allOf={
|
|
|
|
* @OA\Schema(ref="#/components/schemas/pagination"),
|
|
|
|
* @OA\Schema(ref="#/components/schemas/genre"),
|
|
|
|
* }
|
|
|
|
* ),
|
|
|
|
* ),
|
2021-12-27 20:34:28 +05:00
|
|
|
*
|
|
|
|
* @OA\Schema(
|
|
|
|
* schema="genre query filter",
|
|
|
|
* description="Filter genres by type",
|
|
|
|
* type="string",
|
|
|
|
* enum={"genres","explicit_genres", "themes", "demographics"}
|
|
|
|
* )
|
2020-07-10 20:58:07 +05:00
|
|
|
*/
|
|
|
|
public function toArray($request)
|
|
|
|
{
|
2020-12-01 08:55:08 +05:00
|
|
|
return $this->collection;
|
2020-07-10 20:58:07 +05:00
|
|
|
}
|
|
|
|
}
|