Q:

How to make Authentication for another table (not users) in laravel?

I'm trying to make another table called students, and i want to connect login with it instead of users table this because "users" name cause problem on my database.
Initially for register i wrote my own code by creating students table and store records on it and it works successfully.
But for the login, i prefer to use laravel login but with students table is there clear steps or something like this?
i want to never use "users" table

A:

You can change your auth.php, providers array like this:
'providers' => [
    'users' => [
        ...
        'model' => App\Student::class,
    ],
    ...
 ]

And then update your user model like this:
...
use Illuminate\Foundation\Auth\User as Authenticatable; //remove this line
use Illuminate\Database\Eloquent\Model; //Add this line

class User extends Model {
     ...
}

Then change your Students class to following:
...
use Illuminate\Foundation\Auth\User as Authenticatable; //Add this
...

class Student extends Authenticatable {
    ...
}

