mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-21 13:24:27 +00:00
Fix some error due to update migration
This commit is contained in:
@@ -14,7 +14,7 @@ class ChinaBankSlipController extends Controller
|
||||
public function store(Request $request, $id)
|
||||
{
|
||||
$booking = Booking::where('id',$id)->firstOrFail();
|
||||
|
||||
|
||||
// TODO : put this after check file exist
|
||||
// validate file format
|
||||
$validator = Validator::make($request->all(), [
|
||||
@@ -26,7 +26,6 @@ class ChinaBankSlipController extends Controller
|
||||
return response()->json(['message'=>'Incorrect format'],200);
|
||||
}
|
||||
|
||||
|
||||
$validator = Validator::make($request->all(), [
|
||||
'china_bank_slips' => 'max:3072'
|
||||
]);
|
||||
@@ -36,7 +35,6 @@ class ChinaBankSlipController extends Controller
|
||||
return response()->json(['message'=>'Image too large, upload files up to 3 MB'], 400);
|
||||
}
|
||||
|
||||
|
||||
if($bankslip_file = $request->file('file')){
|
||||
|
||||
$filename = $bankslip_file->getClientOriginalName();
|
||||
@@ -53,7 +51,7 @@ class ChinaBankSlipController extends Controller
|
||||
} else {
|
||||
return response()->json(['message'=>'file not found'],200);
|
||||
}
|
||||
|
||||
|
||||
$china_bankslip = new ChinaBankSlip;
|
||||
$china_bankslip->booking_id = $booking->id;
|
||||
$china_bankslip->china_bank_slip_path = $upload_path;
|
||||
|
||||
Reference in New Issue
Block a user