hotwired-laravel / turbo-laravel

This package gives you a set of conventions to make the most out of Hotwire in Laravel.
https://turbo-laravel.com
MIT License
793 stars 48 forks source link

Redirecting to an external link #111

Closed bilogic closed 1 year ago

bilogic commented 1 year ago

When using normal blade and HTTP, we sometimes redirect to an external domain/link. Is there a way to do this with turbo stream?

I'm hoping to use the button tag and javascript, instead of styling an A tag to look like a button and disable turbo :)

tonysm commented 1 year ago

@bilogic not sure what you mean. If you want to redirect the user to an external site after a form submit, I think you can do that just normally. Turbo only turns that into a visit if it's for the same origin (docs), otherwise it will fallback to a full page visit.

Let me know if that's helpful to you.