I'm working with a Library for my university's authentication system (Ucam_Webauth) which means I have to redirect to the authentication server in one of the methods. Unfortunately, I cannot return a Redirect:to()
because of the architecture of this library. The library itself uses header('Location: ...');
but this isn't working for some reason.
If I make the programme die();
after sending the header it works, but otherwise it doesn't.
Any idea how I can fix this?
I'm not sure I follow. Laravel sets the Location header as part of the Redirect::to() method. If you want to more explicitly define the response you could do it like this.
If that doesn't work I'd probably just fall back on the php stdlib header() and return null.
If all of this still doesn't do any good, maybe the profiler is messing things up. If it is turned on, try disabling it in the config.
For example, For this route:
In laravel, you can redirect to url simply using
Alternatively, you can redirect to named route simply using
Sends HTTP headers and content. In my application, send() method acts like 'exit()' and is testable
exit; after header to stop further code execution.
try