Home / Snippets / How to Redirect to External URL in Laravel
How to Redirect to External URL in Laravel cover

How to Redirect to External URL in Laravel

8.5K

2 years ago

0 comments

Redirecting to an external URL in Laravel is quite straight forward but sometimes it might be hard for new Laravel developers that have not explored. To redirect the user to and external URL you can call the "away" function that's available after chaining the redirect() function.
<?php

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

Alaz

Week-end developer currently experimenting with web, mobile, and all things programming.

Topics:

Frontend

Resource

Average

Average

Support Us

If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this