PHP code example of mputkowski / laravel-locale
1. Go to this page and download the library: Download mputkowski/laravel-locale 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/ */
mputkowski / laravel-locale example snippets
->withMiddleware(function (Middleware $middleware) {
$middleware->web(append: [
\mputkowski\Localization\Middleware\VerifyLangCookie::class,
]);
})
'web' => [
\mputkowski\Localization\Middleware\VerifyLangCookie::class,
],
use mputkowski\Localization\Facades\Localization;
Localization::setLocale('en');
php artisan vendor:publish --provider="mputkowski\Localization\ServiceProvider"