Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

check if date between two dates laravel eloquent

//get or exist data between two dates
return Set::where('type', $type)
            ->whereDate('active_start', '<=', date("Y-m-d"))
            ->whereDate('active_end', '>=', date("Y-m-d"))
            ->first();
//@sujay
 
PREVIOUS NEXT
Tagged: #check #date #dates #laravel #eloquent
ADD COMMENT
Topic
Name
1+5 =