PHP code example of orkhanahmadov / laravel-accept-language-middleware
1. Go to this page and download the library: Download orkhanahmadov/laravel-accept-language-middleware 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/ */
orkhanahmadov / laravel-accept-language-middleware example snippets
php
protected $middleware = [
...
\Orkhanahmadov\LaravelAcceptLanguageMiddleware\Middleware::class
];
php
protected $middlewareGroups = [
'web' => [
...
\Orkhanahmadov\LaravelAcceptLanguageMiddleware\Middleware::class
]
];
php
protected $routeMiddleware = [
...
'accept-language' => \Orkhanahmadov\LaravelAcceptLanguageMiddleware\Middleware::class
];
php
Route::middleware(['accept-language'])->get('/', 'MyController@index');