ekosistem dan framework
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Ekosistem;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
use App\Models\Ekosistem\TabelBasisData;
|
||||
use App\Models\Ekosistem\KolomBasisData;
|
||||
use App\Http\Resources\Ekosistem\KolomBasisDataResource;
|
||||
|
||||
class TabelBasisDataResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'tabel' => $this->tabel,
|
||||
'label' => $this->label,
|
||||
'menu' => $this->menu,
|
||||
'deskripsi' => $this->deskripsi,
|
||||
// 'group_id' => $this->group_id,
|
||||
'urutan' => $this->urutan,
|
||||
// 'group' => new GroupBasisDataResource($this->whenLoaded('group')),
|
||||
'kolom' => KolomBasisDataResource::collection($this->whenLoaded('kolom')),
|
||||
//'ringkasan' => RingkasanBasisDataResource::collection($this->whenLoaded('ringkasan')),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user