Created
November 4, 2021 09:39
-
-
Save koyablue/fd3a74cc91d52ece76a6a23a2fa23c83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use App\Packages\FrontPage\Home\Presentation\Controllers\HomeController; | |
use App\Packages\FrontPage\Home\Presentation\Controllers\LocaleController; | |
use Illuminate\Support\Facades\Route; | |
//多言語化のためのmiddlewareを全体に適用 | |
Route::group(['middleware' => 'set.locale'], function () { | |
//言語変更 | |
Route::get('/lang/{locale}', [LocaleController::class, 'setLocaleSession'])->name('locale.set'); | |
Route::get('/', [HomeController::class, 'index'])->name('home'); | |
//略 | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment