I have link :
example.com/register#register
If validation fails laravel redirects to :
example.com/register
w
But if you want to get the proper URL where hash is the fragment part and not a parameter you should use:
redirect(route('route_name', ['some_param_for_route']). '#hash')
instead of:
redirect()->route('route_name', [ 'some_param_for_route', '#hash' ])
so to get:
http://example.com/some_param_for_route#hash
and not:
http://example.com/some_param_for_route?#hash
this way you can also chain it further like for instance:
redirect(route('route_name', ['some_param']). '#hash')->with('status', 'Profile updated!');
You could use helper:
redirect()->route('route_name', [ 'some_param_for_route', '#hash' ])
You could create the URL first, using the route name.
$url = URL::route('route_name', ['#hash_tag']);
Redirect::to($url);
Or...
return Redirect::to(URL::previous() . "#hash_tag");