2 years ago

Cant change default authentication from User Model to Admin Model in auth.php config

Posted 2 years ago by seyidaniels

I am about starting my first official project after learning the basics of Laravel. I do not need a user model in this project so i deleted the default user model and its migration files.

I created my own Admin Model with its migrations file and extended the authenticatable class, also defined my admin controller and did all necessary steps to be done.

But i keep getting this error : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ulssa_laravel.users' doesn't exist (SQL: select count(*) as aggregate from users where username = haruna99)

I googled stuffs online and tried to configure the auth.php in the config folder to point to my Admin Class Model but yet the authentication is still pointing to the deleted User model and Database.

'providers' => [ 'users' => [ 'driver' => 'eloquent', 'model' => App\Admin::class, ],

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