3 years ago

Multi Auth Route Binding

Posted 3 years ago by toneee


I have setup a couple of extra authentication guards to use multi auth in Laravel 5.2.

I am trying to use route binding to save a task against user in one of these guards.

trying the below code doesnt work

    public function test(Request $request, Admin $admin)
        return $admin;

yet trying this does

    public function test(Request $request)
        return Auth::guard('admin')->user();

what am i missing?

Please sign in or create an account to participate in this conversation.