Untitled

 avatar
unknown
plain_text
3 years ago
433 B
3
Indexable
    public function bookings()
    {
        $bookings =  Booking::where([
            ['account_id', "=", Auth::user()->selected_account],
            ['filial_id', "=", Auth::user()->selected_filial],
            ['start',">=" ,Carbon::now()]
        ])->orderBy('start', 'desc')
        ->with('bookableArea','bookableArea.images' ,  'user')
        ->get();
        return response()->json(['data' => $bookings]);
    }