How laravel redirects to the before auth page after login -


i using laravel 5.

i have tried access following url

http:://localhost/myproject/public/index.php/tasks 

i have added app/controllers/controller.php following code

public function __construct() {     $this->middleware('auth'); } 

this code redirects login page whenever try access pages in project. redirects same page have tried access after login. don't know how laravel doing this. can tell how working?

create following function in authcontroller. function override same function in authenticatesandregistersusers trait. can modify code redirect desired location.

/**  * post register / login redirect path.  *  * @return string  */ public function redirectpath() {     if (property_exists($this, 'redirectpath'))     {         return $this->redirectpath;     }      return property_exists($this, 'redirectto') ? $this->redirectto : '/'; } 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -