Skip to content

PHP code snippet – How to calculate date difference between two dates in laravel?

$from = date('2018-01-01');
$to = date('2018-05-02');

Reservation::whereBetween('reservation_from', [$from, $to])->get();
See also  Python code snippet - How to remove a string inside another string ?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.