Hello, I use a language prefix in my routing like this:
Route::get('/', function(){
return Redirect::to('/nl'):
});
Route::group(array('prefix' => '{language}', function() {});
After handling my contactformrequest I want to redirect to this page:
www.test.com/nl/contact
But instead I get
www.test.com/%7Blanguage%7D/contact
Then I tried to pass the prefix in my formhandler as a parameter but without success
public function send(ContactFormRequest $request, $language)
{
return \Redirect::action('SiteController@contact', array('language' => $language)
->with('message', 'Thank you for contacting us!');
}
A dd($language) gives me "{language}"
If I'm not mistaken it was not possible with basic routing in Laravel 4 but can it be done in 5?
Thx
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community