Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange into fix/booking-integration

# Conflicts:
#	app/Http/Controllers/BookingController.php
#	routes/api.php
This commit is contained in:
Jack Goh
2018-06-18 22:42:16 +08:00
4 changed files with 40 additions and 2 deletions
+19 -1
View File
@@ -328,4 +328,22 @@ class BookingController extends Controller
'china_beneficary' => $china_beneficiary
], 200);
}
}
public function approveBankSlip(Request $request, $book_id)
{
if (!$Booking = Booking::where('user_id',Auth::user()->id)->where('id',$book_id)->first())
{
return response()->json(['message'=>'Access denied'], 200);
}
if(!$userBankSlip = UserBankSlip::where('book_id',$Booking->id)->first())
{
return response()->json(['message'=>'Access denied'], 200);
}
$userBankSlip->is_approve = 1;
$userBankSlip->save();
return response()->json(['message'=>'Success'],200);
}
}