Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get recoed between two datetime laravel

public function scopeCreatedBetweenDates($query, array $dates)
{
    return $query->whereDate('created_at', '>=', $dates[0])
        ->whereDate('created_at', '<=', $dates[1])
}
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #recoed #datetime #laravel
ADD COMMENT
Topic
Name
3+8 =