Try with query builder
DB::table('ExamsSchedule')
->whereDate('exam_date', '>=', Carbon::now()->toDateString())
->get();
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hello every one, iam trying to get the result where the date field is bigger than current date (( like in next days or weeks ))
i try following
ExamsSchedule::whereDate('exam_date', '>=', Carbon::now()->toDateString());
ExamsSchedule::where('exam_date', '>=', Carbon::now()->toDateString());
even i try to hard code it so i can see if there is a problem or something
ExamsSchedule::where('exam_date', '>=', '2016-10-28');
but same issue
anyone have something similar
btw my date field (exam_date) is in date type in db like (2016-10-23)
@tomi hmmm this way its working but why not working with the where with model object, the issue now i cant use the other methods in relations =(
i found the issue >_< i didnt add the get() at the end
ExamsSchedule::where('exam_date', '>=', Carbon::now()->toDateString())->get();
thx
Please or to participate in this conversation.