Getting the Authentication Request Instance


You want to access the request instance used by authentication.


Use the Auth::getRequest() method.

$request = Auth::getRequest();


Usually you can just access the Request facade.

By default Laravel uses the same request for both the Request facade and the Auth facade. This means unless your application is explicitly setting the request, it's easier to use the Request facade.

comments powered by Disqus