芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/lavishbdlifestyle.com/app/Http/CategoryCollection.php
<?php namespace App\Http\Resources\V2; use Illuminate\Http\Resources\Json\ResourceCollection; use App\Utility\CategoryUtility; class CategoryCollection extends ResourceCollection { public function toArray($request) { return [ 'data' => $this->collection->map(function ($data) { return [ 'id' => $data->id, 'slug' => $data->slug, 'name' => $data->getTranslation('name'), 'banner' => uploaded_asset($data->banner), 'icon' => uploaded_asset($data->icon), 'number_of_children' => CategoryUtility::get_immediate_children_count($data->id), 'links' => [ 'products' => route('api.products.category', $data->id), 'sub_categories' => route('subCategories.index', $data->id) ] ]; }) ]; } public function with($request) { return [ 'success' => true, 'status' => 200 ]; } }
Page is not found
Oops! Page not found.
Sorry, an error has occured, Requested page not found!
Back To Homepage