@php use App\Models\Item; use App\Models\Calendar; $foods = Item::orderBy('created_at', 'desc')->paginate(5); // $day = Calendar::where('set', 1) // ->where('day', now()->format('l'))->first(); $todayDate = date("Y-m-d"); $day = Calendar::where('set', 1) ->where('start_date', $todayDate) ->orWhere('start_date', '>', $todayDate) ->orWhere('end_date', '<', $todayDate) ->where('end_date', $todayDate) ->first(); @endphp {{-- --}}
{{-- --}}