mirror of https://github.com/4xmen/xshop.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
872 B
PHTML
33 lines
872 B
PHTML
5 months ago
|
<?php
|
||
|
|
||
|
namespace App\Http\Resources;
|
||
|
|
||
|
use Illuminate\Http\Request;
|
||
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||
|
|
||
|
class PropCollection extends JsonResource
|
||
|
{
|
||
|
/**
|
||
|
* Transform the resource collection into an array.
|
||
|
*
|
||
|
* @return array<int|string, mixed>
|
||
|
*/
|
||
|
public function toArray(Request $request): array
|
||
|
{
|
||
|
return [
|
||
|
'id' => $this->id,
|
||
|
'name' => $this->name,
|
||
|
'label' => $this->label,
|
||
|
'searchable' => (bool) $this->searchable,
|
||
|
'priceable'=> (bool) $this->priceable,
|
||
|
'unit' => $this->unit,
|
||
|
'required' => $this->required,
|
||
|
'width' => $this->width,
|
||
|
'icon' => $this->icon,
|
||
|
'dataList' => $this->dataz,
|
||
|
'optionList' => $this->optionz,
|
||
|
];
|
||
|
}
|
||
|
}
|