Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
433 B
2
Indexable
Never
    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]);
    }