You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
621 B
21 lines
621 B
<?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); |
|
} |
|
}
|
|
|