By default, Laravel uses the email and password fields for authentication , I want to change the default fileds for authentication and set the code_massar , date_naissance fields as default
any help !!
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string("code_massar");
$table->date("date_naissance");
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
I use breez package as Authentification Method !
I found one method in laravel 5
2
Answers
Check this post. It’s with ldap but it should be usefull i think https://ldaprecord.com/docs/laravel/v2/auth/database/laravel-breeze/#introduction
Go to authenticate method of your LoginController and modify it as your need
you can see more here https://laravel.com/docs/9.x/authentication#authenticating-users