Reputation: 961
E.G. we want to redirect to
http://example.loc/common/{$alias}
Suppose that http://example.loc/common/
route has a pseudo name - common
. All that remain is build the Redirect::route
expression; it would be something like
Redirect::url('common/{$alias}'); // warning: invalid code
Upvotes: 1
Views: 251
Reputation: 1824
You can redirect to a url writing it as a string
$alias = 'some-url';
redirect('common/'.$alias);
Also, if you know the route and it's a named route, you can use
redirect()->route('named.route', $alias);
Upvotes: 0
Reputation: 182
You can have any of below methods i guess.
$data = '1234';
return redirect('common/'.$abc);
or
$url = 'commom/'.$data;
return Redirect::to($url);
Upvotes: 1