PHP code example of j-hansol / laravel-language-detect
1. Go to this page and download the library: Download j-hansol/laravel-language-detect 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/ */
j-hansol / laravel-language-detect example snippets
Route::prefix('{locale}')->group(function() {
Route::get('test', [\App\Http\Controllers\LanguageSettingTest::class, 'showResult'])
->middleware('set_language');
});
language_detect.php
shell
php artisan vendor:publish --tag=language-detect