Home > front end >  Redirect to external urls does not work in Laravel 8
Redirect to external urls does not work in Laravel 8

Time:02-02

I'm kind of new to Laravel, when I try to redirect to an external URL I get a blank page. I running the Laravel on my local machine.

This is my web.php

Route::get('/pay', function () {
    
    return view('pay');
});

This is a code that I try to run inside pay.blade.php

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

CodePudding user response:

Try this

redirect()->to('https://www.google.com')->send();
  •  Tags:  
  • Related