6
0
Fork 0
jiqu-library-server/app/Endpoint/Api/Http/Resources/DeskResource.php

23 lines
560 B
PHP

<?php
namespace App\Endpoint\Api\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class DeskResource extends JsonResource
{
public function toArray($request)
{
return [
'id' => $this->id,
'extra' => $this->extra,
'name' => $this->name,
'remarks' => $this->remarks,
'status' => $this->status,
'store_id' => $this->store_id,
'wxcode' => $this->wxcode,
'store' => StoreResource::make($this->whenLoaded('store')),
];
}
}