24 lines
555 B
PHP
24 lines
555 B
PHP
<?php
|
|
|
|
namespace Sarga\API\Http\Resources\Catalog;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
use Sarga\API\Http\Resources\Core\Slider;
|
|
|
|
class HomeResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'sliders' => Slider::collection($this->sliders),
|
|
//'product_sections' => HomeProductSection::collection($this->product_section),
|
|
];
|
|
}
|
|
}
|