|
|
|
@ -12,7 +12,12 @@ class PeminjamanApiController extends Controller
|
|
|
|
|
{ |
|
|
|
|
public function index() |
|
|
|
|
{ |
|
|
|
|
$peminjaman = \App\Models\asset_status::with(['peti.customer', 'peti.tipe_peti', 'warehouse', 'warehouseEnter'])->get(); |
|
|
|
|
$peminjaman = \App\Models\asset_status::with([ |
|
|
|
|
'peti.customer:id,name,code_customer,lot_no,nip,no_hp,tgl_lahir,jenis_kelamin,agama,address', |
|
|
|
|
'peti.tipe_peti:id,type,size_peti,description', |
|
|
|
|
'warehouse', |
|
|
|
|
'warehouseEnter' |
|
|
|
|
])->get(); |
|
|
|
|
|
|
|
|
|
return ResponseFormatter::success([ |
|
|
|
|
'message' => 'Data peminjaman berhasil diambil', |
|
|
|
@ -20,6 +25,22 @@ class PeminjamanApiController extends Controller
|
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// public function index() |
|
|
|
|
// { |
|
|
|
|
// $peminjaman = \App\Models\asset_status::with([ |
|
|
|
|
// 'peti.customer:id,name,code_customer,lot_no,nip,no_hp,tgl_lahir,jenis_kelamin,agama,address', |
|
|
|
|
// 'peti.tipe_peti:id,type,size_peti,description', |
|
|
|
|
// 'warehouse', |
|
|
|
|
// 'warehouseEnter' |
|
|
|
|
// ])->paginate(10); |
|
|
|
|
|
|
|
|
|
// return ResponseFormatter::success([ |
|
|
|
|
// 'message' => 'Data peminjaman berhasil diambil', |
|
|
|
|
// 'asset_status' => $peminjaman, |
|
|
|
|
// ]); |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getWarehouseEnter() |
|
|
|
|
{ |
|
|
|
|
$warehouse = \App\Models\m_warehouse::get(); |
|
|
|
|