PHP code example of naoray / laravel-localizer

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

    

naoray / laravel-localizer example snippets


'supported-locales' => ['en', 'de']

'stores' => [
  CodeZero\Localizer\Stores\SessionStore::class,
  CodeZero\Localizer\Stores\CookieStore::class,
  CodeZero\Localizer\Stores\AppStore::class,
  Naoray\LaravelLocalizer\Stores\CarbonStore::class,
],

//...
protected function mapWebRoutes()
{
    Route::middleware(['web', 'localize'])
          ->namespace($this->namespace)
          ->group(base_path('routes/web.php'));
}

//...
'Localizer' => Naoray\LaravelLocalizer\Facades\LocalizerFacade::class,