Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (13 sloc) 364 Bytes
<?php
declare(strict_types=1);
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\ResourceCollection;
class CommentResourceCollection extends ResourceCollection
{
public function toArray($request): array
{
return $this->collection->map(function ($value) {
return new CommentResource($value);
})->all();
}
}
You can’t perform that action at this time.