mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
55 lines
1.3 KiB
PHP
55 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Resources\V4;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class PicturesResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*
|
|
* @OA\Schema(
|
|
* schema="pictures",
|
|
* description="Pictures Resource",
|
|
*
|
|
* @OA\Property(
|
|
* property="data",
|
|
* type="array",
|
|
*
|
|
* @OA\Items(
|
|
* type="object",
|
|
* @OA\Property(
|
|
* property="images",
|
|
* ref="#/components/schemas/anime_images"
|
|
* ),
|
|
* ),
|
|
* ),
|
|
* ),
|
|
*
|
|
* @OA\Schema(
|
|
* schema="pictures_variants",
|
|
* description="Pictures Resource",
|
|
*
|
|
* @OA\Property(
|
|
* property="data",
|
|
* type="array",
|
|
*
|
|
* @OA\Items(
|
|
* type="object",
|
|
* @OA\Property(
|
|
* property="images",
|
|
* ref="#/components/schemas/common_images"
|
|
* ),
|
|
* ),
|
|
* ),
|
|
* )
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return $this['pictures'];
|
|
}
|
|
} |