PHP code example of darkghosthunter / laradate

1. Go to this page and download the library: Download darkghosthunter/laradate 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/ */

    

darkghosthunter / laradate example snippets


use Illuminate\Support\Facades\Route;
use Illuminate\Support\Carbon;

Route::get('matches/{date}', function (Carbon $date) {
    return $date;
});

use Illuminate\Support\Facades\Route;
use Illuminate\Support\Carbon;

// birthdays/2015_07_04
Route::get('birthdays/{date:Y_m_d}', function (Carbon $date) {
    return $date;
});

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

Route::post('birthdays/{date}', function (Request $request, Carbon $date) {
    // ...
})->middleware('date:today 00:00,3 months 23:59:59');