PHP code example of lara-middleware / response-time

1. Go to this page and download the library: Download lara-middleware/response-time 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/ */

    

lara-middleware / response-time example snippets


// app/Http/Kernel.php
protected $middleware = [
	'LaraMiddleware\ResponseTime\ResponseTime',
	....
]

// app/Http/Kernel.php
protected $routeMiddleware = [
	'response-time' => 'LaraMiddleware\ResponseTime\ResponseTime',
	....
]

Route::get('some-specific', ['middleware' => 'response-time', function()
{
    //
}]);