jeudi 24 octobre 2019

Laravel Wrong Login Redirect

So I have the route lsapp.test/firms/1 which isn't available if you are not logged in.

But if I go to that route without being logged in is redirecting me to the login.After I log in it redirects me back to lsapp.test/firms/1, not the dashboard, and I get an error.

I've changed $redirectTo in the controllers to /dashboard but still isn't working.

If I go to /login and login it works.

How I can fix this?

 public function __construct()
    {
        $this->middleware('auth');
    }
 public function show($id)
    {
        $employes = Firm::find($id)->employes()->paginate(5);
        return view('firms.show')->with("employes", $employes);
    }

Error: Call to a member function employes() on null.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2N97FKT
via IFTTT

Aucun commentaire:

Enregistrer un commentaire