DONE: store mykad image in database
This commit is contained in:
@@ -358,7 +358,7 @@ class CustomersController extends Controller
|
||||
])->json();
|
||||
}
|
||||
|
||||
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/api/customers/create/' . $auth_user['cawangan'], [
|
||||
$customer_payload = [
|
||||
'kodcaw' => $auth_user['cawangan'],
|
||||
'nopelanggan' => $no_pelanggan,
|
||||
'nokpbaru' => $nokpbaru,
|
||||
@@ -385,7 +385,14 @@ class CustomersController extends Controller
|
||||
'nota_pekerjaan' => $request->nota_pekerjaan,
|
||||
'notaarcc' => $request->notaarcc,
|
||||
'tujuangadai' => $request->tujuan_gadai,
|
||||
]);
|
||||
];
|
||||
|
||||
if ($request->filled('photo_base64')) {
|
||||
$customer_payload['photo_base64'] = $request->input('photo_base64');
|
||||
$customer_payload['photo_mime'] = $request->input('photo_mime') ?: 'image/jpeg';
|
||||
}
|
||||
|
||||
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/api/customers/create/' . $auth_user['cawangan'], $customer_payload);
|
||||
|
||||
Session::put('customer_info', $customer_info);
|
||||
Session::put('noic', $request->noic);
|
||||
|
||||
Reference in New Issue
Block a user