PHP code example of hedii / laravel-date-range

1. Go to this page and download the library: Download hedii/laravel-date-range library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hedii / laravel-date-range example snippets




namespace App;

use Hedii\LaravelDateRange\DateRange;

class MyModel extends Model
{
    use DateRange;

    /* ... */
}

$currentDayEntries = MyModel::currentDay()->get();
$lastYearEntries = MyModel::lastYear()->get();
$entriesFromTheLastTenDays = MyModel::lastDays(10)->get();