1. Go to this page and download the library: Download getsupercode/localizater 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/ */
// routes/web.php
use Getsupercode\Localizater\Facades\Localizater;
use Illuminate\Support\Facades\Route;
Localizater::group(function () {
Route::view('/', 'welcome')->name('welcome');
Route::get('/user', 'UserController@index');
});
// Put other (Non read) route actions outside the `Localizater::group` as you don't need to have multiple locales for those actions.
Route::post('/user', 'UserController@store');
Localizater::group(['middleware' => 'auth'], function () {
Route::view('/home', 'home')->name('home');
});