unknown
1 year ago
8 changed files with 151 additions and 82 deletions
@ -0,0 +1,21 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\API\v1\CustomerApi; |
||||
|
||||
use Illuminate\Http\Request; |
||||
use App\Helpers\ResponseFormatter; |
||||
use App\Http\Controllers\Controller; |
||||
|
||||
class CustomerApiController extends Controller |
||||
{ |
||||
public function index() |
||||
{ |
||||
$customers = \App\Models\customer::select('id', 'name', 'code_customer', 'lot_no', 'no_tlp', 'address', 'created_by', 'updated_by')->orderBy('created_at', 'DESC')->get(); |
||||
|
||||
return ResponseFormatter::success([ |
||||
'status' => true, |
||||
'message' => 'Data warehouse berhasil diambil', |
||||
'customers' => $customers |
||||
], 200); |
||||
} |
||||
} |
@ -0,0 +1,20 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\API\v1\KondisiPetiApi; |
||||
|
||||
use Illuminate\Http\Request; |
||||
use App\Helpers\ResponseFormatter; |
||||
use App\Http\Controllers\Controller; |
||||
|
||||
class KondisiPetiApiController extends Controller |
||||
{ |
||||
public function index() |
||||
{ |
||||
$kondisi = \App\Models\kondisi_peti::get(); |
||||
|
||||
return ResponseFormatter::success([ |
||||
'message' => 'Data kondisi peti berhasil diambil', |
||||
'kondisi_peti' => $kondisi, |
||||
]); |
||||
} |
||||
} |
@ -0,0 +1,21 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\API\v1\TipePetiApi; |
||||
|
||||
use Illuminate\Http\Request; |
||||
use App\Helpers\ResponseFormatter; |
||||
use App\Http\Controllers\Controller; |
||||
|
||||
class TipePetiApiController extends Controller |
||||
{ |
||||
public function index() |
||||
{ |
||||
$tipePeti = \App\Models\Type_peti::get(); |
||||
|
||||
return ResponseFormatter::success([ |
||||
'status' => true, |
||||
'message' => 'Data warehouse berhasil diambil', |
||||
'tipe_peti' => $tipePeti |
||||
]); |
||||
} |
||||
} |
Loading…
Reference in new issue