I have such URL in Laravel 5:
domain.com/search-user/email@domain.net
When I enter this URL, it automatically searches data by given email.
How I should redirect user from other controller to this URL?
I have tried, but it doesn't work:
return view(‘controller.search-user')->with('email', $request->email);
My routes file:
Route::post('/search-user', 'tnt6weeklistController@postSearchUser');
Route::get('/search-user/{email}', 'tnt6weeklistController@postSearchUser');
-------SOLVED---------- Solved issue only with this code (maybe it is not the best practice, but other solutions didn't worked):
return \Redirect::to('http://domain.com/search-user/'.$request->email);