jikan-rest/app/Http/Resources/V4/MangaCharactersResource.php

43 lines
1.1 KiB
PHP
Raw Normal View History

2020-07-05 11:29:11 +05:00
<?php
namespace App\Http\Resources\V4;
use Illuminate\Http\Resources\Json\JsonResource;
2020-07-05 12:26:49 +05:00
class MangaCharactersResource extends JsonResource
2020-07-05 11:29:11 +05:00
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
2020-07-16 05:40:54 +05:00
*
* @OA\Schema(
* schema="manga characters",
* description="Manga Characters Resource",
*
* @OA\Property(
* property="data",
* type="array",
* @OA\Items(
* type="object",
*
* @OA\Property(
2021-05-14 00:52:46 +05:00
* property="character",
* type="object",
* ref="#/components/schemas/character meta",
2020-07-16 05:40:54 +05:00
* ),
* @OA\Property(
* property="role",
* type="string",
* description="Character's Role"
* ),
* ),
* ),
* )
2020-07-05 11:29:11 +05:00
*/
public function toArray($request)
{
2020-07-05 12:26:49 +05:00
return $this['characters'];
2020-07-05 11:29:11 +05:00
}
}