Redirect to another url or website in laravel

Laravel

Nicesnippets

365

01-05-2020


Hello Guys,

In laravel many way to redirect to other url,domain and website. but following is the proper way redirecting to external domains. if you have question in laravel redirect to different website. if get this type of error then use following way class 'app\http\controllers\redirect' not found

public function index()

{

return redirect()->away('https://nicesnippets.com/blog');

}

I hope it can help you...