Why redirect() not working in laravel 5 constructor

why redirect() is working in routes and methods only.

So for getting the advantage of redirection in constructor, we have to use a special function.


For using the above function we need to add a below line of code in Controller :-

use Illuminate\Support\Facades\Redirect;

Note :- here userLogin our routes name

Check it also

check for the documentation

One thought on “Why redirect() not working in laravel 5 constructor”

Leave a Reply

Your email address will not be published. Required fields are marked *