ERP-API/app/Http/Resources/Accounting/Account/ListResource.php

29 lines
686 B
PHP

<?php
namespace App\Http\Resources\Accounting\Account;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class ListResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
"id" => $this->id,
"name" => $this->name,
"code" => $this->code,
"sheet" => $this->sheet,
"type" => $this->type,
"category" => $this->category,
"subcategory" => $this->subcategory,
"structure" => $this->structure
];
}
}