mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
fix unauthorized booking access
This commit is contained in:
@@ -24,12 +24,19 @@ 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('status', '=', '6')
|
||||
->orwhere('status', '=', '4')
|
||||
->orwhere('status', '=', '3')
|
||||
->orwhere('status', '=', '2')
|
||||
->orwhere('status', '=', '1')
|
||||
// ->where('status', '=', '6')
|
||||
// ->orwhere('status', '=', '4')
|
||||
// ->orwhere('status', '=', '3')
|
||||
// ->orwhere('status', '=', '2')
|
||||
// ->orwhere('status', '=', '1')
|
||||
->where('user_id', Auth::user()->id)
|
||||
->where(function ($query) {
|
||||
$query->where('status', '=', '6')
|
||||
->orwhere('status', '=', '4')
|
||||
->orwhere('status', '=', '3')
|
||||
->orwhere('status', '=', '2')
|
||||
->orwhere('status', '=', '1');
|
||||
})
|
||||
->orderby('updated_at','desc')
|
||||
->paginate(10);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user