bitfumes / laravel-multiauth

Multi Auth and admin auth in Laravel Project
MIT License
470 stars 105 forks source link

Setting own Model - still not fixed #132

Closed webleyson closed 3 years ago

webleyson commented 4 years ago

Describe the bug In the docs it says you can set your own Admin model

https://bitfumes.github.io/laravel-multiauth/settings.html#models

I have set the following

'admin' => App\Admin::class,

But this has no affect. I have set in - vendors/config/auth.php and it sets.

What am I doing wrong?

Laravel Version 7.24

To Reproduce Steps to reproduce the behavior:

  1. Go to 'config/multiauth.php'
  2. Set model to local model - app/Admin.php
  3. dd(Auth::guard('admin')->user());
  4. See error - Not the App/Admin auth

Expected behavior Expected to see admin from my app folder

sarthaksavvy commented 3 years ago

This is now fixed with new version try 5.2.0

webleyson commented 3 years ago

This is still not fixed.. 'models' => [ 'admin' => App\Admin::class, 'role' => Bitfumes\Multiauth\Model\Role::class, 'permission' => Bitfumes\Multiauth\Model\Permission::class, ],

dd(Auth::guard('admin')->user());

is still showing -

Bitfumes\Multiauth\Model\Admin