![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/job-board.corals.io/Corals/modules/Ecommerce/Transformers/API/ |
<?php namespace Corals\Modules\Ecommerce\Transformers\API; use Corals\Foundation\Transformers\APIBaseTransformer; use Corals\Modules\Ecommerce\Models\Brand; class BrandTransformer extends APIBaseTransformer { /** * @param Brand $brand * @return array * @throws \Throwable */ public function transform(Brand $brand) { $transformedArray = [ 'id' => $brand->id, 'name' => $brand->name, 'slug' => $brand->slug, 'thumbnail' => $brand->thumbnail, 'products_count' => $brand->products_count, 'status' => $brand->status, 'is_featured' => $brand->is_featured, 'created_at' => format_date($brand->created_at), 'updated_at' => format_date($brand->updated_at), ]; return parent::transformResponse($transformedArray); } }