vendredi 25 décembre 2015

Laravel how to add group prefix parameter to route function

For example, I have defined routes like this:

Route::group(array('prefix' => $locale), function()
{
  Route::get('/about', ['as' => 'about', 'uses' => 'aboutController@index']);
}

I want to generate links for en and de locale. When I try to provide prefix parameter like this

$link = route('about',['prefix' => 'de']);

I got link like this http://ift.tt/1QLOOUl How to provide prefix param to got link like this example.com/de/about



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire