Starting to add localization into PTB

This commit is contained in:
2018-09-26 22:52:43 -03:00
parent 55e0c68094
commit 1ff8a4f492
8 changed files with 57 additions and 5 deletions

View File

@@ -15,6 +15,12 @@ Route::get('/', function () {
return view('welcome');
});
Route::get('/lang/{locale}', function ($locale) {
session(['lang' => $locale]);
session()->save();
return back();
});
Route::get('/product', 'ProductController@index')->middleware('verified');
Route::get('/product/{product}', 'ProductController@show')->middleware('verified');
Route::post('/product', 'ProductController@store')->middleware('verified');