Merge branch 'fix/slice-error' into 'master'

fix booking not found bug

See merge request CIEFWorldwideSdnBhd/exchange!114
This commit is contained in:
Jack Goh
2018-08-13 07:10:26 +00:00
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -24,6 +24,7 @@ class BookingController extends Controller
public function index(){
$user = Auth::user();
$bookings = Booking::select('user_id', 'id', 'created_at', 'status', 'rate', 'term', 'amount', 'bia', 'verification_status')
->where('user_id', Auth::user()->id)
->where('status', '<', '7')
->orderby('updated_at','desc')
->paginate(10);
@@ -316,7 +317,10 @@ class BookingController extends Controller
}
return $booking;
}
}
else{
return response()->json(['success'=>false, 'message'=>'Booking not found'], 404);
}
}
public function adminShow($id)