Problem with redirect on Sage 10

You’re running into the same problem you had here, and it has the same solution: Problem with change header location This is not an issue with Sage: It is a basic concept for WordPress and web development generally.

Redirects are done by sending redirect headers to the browser, and you can’t send headers again once output has begun. Any time you attempt to do so you’ll get a “headers already sent” error, which is exactly what you have here. If you look at the source code for wp_redirect you can see that it’s attempting to send headers: https://developer.wordpress.org/reference/functions/wp_redirect/

You can modify headers using WordPress’s hooks for that (which are linked in the other post), but once output has begun (i.e. once you’re in a Blade template) it’s too late, so you need to hook those actions earlier. I’d recommend familiarizing yourself with WordPress’s list of actions: https://codex.wordpress.org/Plugin_API/Action_Reference