mardi 27 décembre 2016

How to add dynamically prefix to routes?

In session i set default language code for example de. And now i want that in link i have something like this: http://ift.tt/2iaAerG.

Problem is that i cant access session in routes. Any suggestion how can i do this?

  $langs = Languages::getLangCode();
    if (in_array($lang, $langs)) {
      Session::put('locale', $lang);
      return redirect::back();
    }
    return;

Route::get('blog/articles', 'StandardUser\UserBlogController@AllArticles');

So i need to pass to route as prefix this locale session.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire