PHP code example of phyconlabs / laravel-languages
1. Go to this page and download the library: Download phyconlabs/laravel-languages 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/ */
phyconlabs / laravel-languages example snippets
php artisan vendor:publish --provider="Phycon\Translations\TranslationServiceProvider"
php artisan migrate
$localizer = \App::make( \Waavi\Translation\UriLocalizer::class );
Route::group( [ 'prefix' => $localizer->localeFromRequest(), 'middleware' => 'locale' ], function () {
Route::get( 'test', 'TestController@index' )->name( 'test' );
});