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",
|
|
|
|
*
|
2021-12-28 00:49:38 +05:00
|
|
|
* @OA\Property(
|
2020-07-17 00:13:07 +05:00
|
|
|
* property="data",
|
2021-12-27 23:42:18 +05:00
|
|
|
* type="array",
|
|
|
|
* @OA\Items(
|
|
|
|
* type="object",
|
2021-12-28 00:49:38 +05:00
|
|
|
* ref="#/components/schemas/genre"
|
2021-12-27 23:42:18 +05:00
|
|
|
* ),
|
2021-12-28 00:49:38 +05:00
|
|
|
* ),
|
2021-12-27 20:34:28 +05:00
|
|
|
* )
|
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
|
|
|
}
|
2023-01-02 16:29:05 +00:00
|
|
|
}
|