Problem with languages in laravel

1

I have a laravel language system, I'm using their localization system. I have the system working, what happens and when I go back to the domain.com of the error I wanted it to be shown by default a language to define by me is possible?

Route

Route::group(['prefix'=>'{lang}'], function (){
   Route::get('/', function ($lang) {
      App::setLocale($lang);
      return view('home');
   });
   Route::get('/login', function ($lang) {
      App::setLocale($lang);
      return view('login');
   });
   Route::get('/registo', function ($lang) {
      App::setLocale($lang);
      return view('registo');
   });
   Route::get('/termos', function ($lang) {
      App::setLocale($lang);
      return view('termos');
   });
   Route::get('/sobre', function ($lang) {
      App::setLocale($lang);
      return view('sobre');
   });
   Route::get('/contactos', function ($lang) {
      App::setLocale($lang);
      return view('contactos');
   });
});

Error

    
asked by anonymous 26.10.2017 / 01:50

0 answers