taktik - laravel
This commit is contained in:
30
app/Http/Resources/CommentCollection.php
Normal file
30
app/Http/Resources/CommentCollection.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use OpenApi\Annotations as OA;
|
||||
|
||||
/**
|
||||
* @OA\Schema(
|
||||
* schema="CommentCollection",
|
||||
* type="array",
|
||||
* title="Comment Collection",
|
||||
* description="A collection of CommentCollection",
|
||||
* @OA\Items(ref="#/components/schemas/CommentResource")
|
||||
* )
|
||||
*/
|
||||
class CommentCollection extends ResourceCollection
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return array<string, mixed>|\Illuminate\Contracts\Support\Arrayable<string, mixed>|\JsonSerializable
|
||||
*/
|
||||
public function toArray(Request $request): array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
||||
{
|
||||
return parent::toArray($request);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user