user16253450
user16253450

Reputation:

Changing redirect path in laravel

public function submitStore ( Request $r )
    {
$site->url = $uri;
}
        // redirect to the new listing
        return redirect()->route( 'home' );

I want to redirect it to https://example.com/$uri instead of redirecting to 'home' How can I do this? Thank you for helping

Upvotes: 0

Views: 31

Answers (1)

Got The Fever Media
Got The Fever Media

Reputation: 760

A quick look at the documentation here: https://laravel.com/docs/8.x/responses#redirecting-external-domains

gives you

return redirect()->away('https://www.google.com');

Upvotes: 1

Related Questions