23 lines
603 B
PHP
23 lines
603 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use App\Models\BreederForGmap;
|
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
|
|
|
class BreederMapCollection extends ResourceCollection
|
|
{
|
|
/**
|
|
* Transform the resource collection into an array.
|
|
*
|
|
* @param mixed $request
|
|
* @return array
|
|
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return $this->collection->map(function (BreederForGmap $breederData) {
|
|
return $breederData->googleMapSerialize();
|
|
})->all();
|
|
}
|
|
}
|