fix booking not found bug

This commit is contained in:
Jack Goh
2018-08-13 15:04:36 +08:00
parent 0c7cd0b201
commit a68095f203
2 changed files with 6 additions and 5 deletions
+5 -5
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);
@@ -78,10 +79,6 @@ class BookingController extends Controller
return $bookings;
}
public function userComplete(){
$user = Auth::user();
$bookings = Booking::select('user_id', 'id', 'created_at', 'status', 'rate', 'term', 'amount', 'bia', 'verification_status')
@@ -320,7 +317,10 @@ class BookingController extends Controller
}
return $booking;
}
}
else{
return response()->json(['success'=>false, 'message'=>'Booking not found'], 404);
}
}
public function adminShow($id)
+1
View File
@@ -13,6 +13,7 @@ RUN curl --silent --show-error --fail --location \
COPY Caddyfile /etc/Caddyfile
WORKDIR /var/www
ADD ../storage/app/public .
RUN ln -sf /var/www/storage/app/public /var/www/public/storage
CMD ["/usr/bin/caddy", "--conf", "/etc/Caddyfile", "--log", "stdout"]