Changing Your Authentication Table

Problem

You want your application’s users in a different table than users.

Your application is using database authentication and needs to use a different table than Laravel’s default users table.

Solution

Edit app/config/auth.php to change the table.

    'table' => 'administrators',

Discussion

Don’t forget the required columns.

Whatever the authentication table is set to, it must contain an id column, a password column, and some other column to authentication the user with. This other column is typically either email or username.



from Linux Hint https://ift.tt/2FW5o5T

Post a Comment

0 Comments