8
How I’m studying the book Code Bright, from time to time there are some errors that I take a long time to resolve. However, I couldn’t find a solution in Google.
By doing the Redirect::to()
from one route to another the previous full address should be displayed, but only my URL appears vhost
without the remainder of the route.
Code Bright book code:
Route::get('first', function()
{
// redirect to the second route
return Redirect::to('second');
});
Route::get('second', function()
{
return URL::previous();
});
When I walk into the endereço/first
and I’m redirected to the route endereço/second
, should appear written endereço/first
but only address appears.
Question
What would be the right solution to solve the return url print?
Detail, I checked on github that as far as I understood the Redirect::to
generates a 302 call that does not transmit the information from where the route request is coming from. Perhaps you are wrong about this.
Just to let you know, tags are used to help locate questions. They are even used to help index on Google. It’s made in a very clever way. So the name in the title doesn’t help the search, Having one isn’t just a taste.
– Maniero