D
D
Denis Bukreev2017-04-20 09:50:21
Laravel
Denis Bukreev, 2017-04-20 09:50:21

Laravel redirect to another domain - how to do it?

So it goes.
I could google only redirects to internal pages and paths, but I need to send the user to another URL directly in the routes - how to do this?
The funny thing is that all the articles as one are called "all about the Laravel redirect", but such a simple moment is not described anywhere.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Victor, 2017-04-20
@denisbookreev

Route::get('foo', function () {
    return redirect("http://vk.com");
});

J
JhaoDa, 2017-04-20
@JhaoDa

redirect()->away('http://exmple.com');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question