Add Service Config
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Internal\Transformers;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class CorporateServiceConfigResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'corporate_id' => $this->corporate_id,
|
||||
'service_code' => $this->service_code,
|
||||
'status' => $this->status,
|
||||
'name' => $this->service->name,
|
||||
'description' => $this->service->description,
|
||||
'configurations' => $this->configs->pluck('value', 'name')
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user