You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
750 B
29 lines
750 B
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use App\Models\ShopCategory as ShopCategoryDB;
|
|
use Illuminate\Http\Resources\Json\Resource;
|
|
|
|
class ShopFootprint extends Resource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
"id"=>$this->id,
|
|
"goods_name"=> $this->shop_goods->goods_name,
|
|
"primary_pic_url"=> config('filesystems.disks.oss.url').'/'.$this->shop_goods->primary_pic_url,
|
|
"goods_brief"=> $this->shop_goods->goods_brief,
|
|
"retail_price"=> $this->shop_goods->retail_price,
|
|
"add_time"=> $this->add_time,
|
|
];
|
|
}
|
|
|
|
}
|