laravel 5.4 use different column name and table for authentication

Published 3 months ago by omniware

What are the changes I need to do, after auth:make in Laravel 5.4 to use admins Table with admi_login and password to login, register, password reset and forgot password . The structure of admins table is as following.

        $table->increments('admi_id');
        $table->string('admi_login');
        $table->string('admi_email')->unique();
        $table->string('admi_password', 60);
        $table->string('admi_active', 1)->default('n');
        $table->string('admi_remember_token', 100)->nullable();
        $table->timestamp('admi_insert_datetime');
        $table->timestamp('admi_update_datetime');

and structure of admin_password_resets tables is

        $table->string('email')->index();
        $table->string('token')->index();
        $table->timestamp('created_at');
omniware

No answers, is this that difficult to use a different table with different column names for auth in laravel 5.4?

jlrdw
jlrdw
3 months ago (156,190 XP)
omniware

@jlrdw Thanks for your response, but that question answers how phone or email can be used for logging in. I am trying to overload a few functions, but I see there are quite a few places where users are hard-coded in the code.

Actually I am migrating my Laravel 5.1 project to Laravel 5.4. these bottle necks are at migration from 5.2 to 5.3.

vipin93

also u have change passwords provider in auth. php, in your Admin model protected table and protected id

Sign In or create a forum account to participate in this discussion.