Login With Email Or Username (In One Field)
You can install the package via composer:
composer require minhk/filament-login-multiauth
This is the contents of the published config file:
return [
'table_name' => 'users',
'username_column' => 'username',
'model' => 'App\\Models\\User',
];
You can publish the config file with:
php artisan vendor:publish --tag="filament-login-multiauth-config"
If you don't have a username column in users' table, you can publish the migration file and migrate it:
php artisan vendor:publish --tag="filament-login-multiauth-migrations"
php artisan migrate
If you want to generate username by email, you can run command:
php artisan generate:username --all-user=true
or
php artisan generate:username [email protected]
Register the Minhk\FilamentLoginMultiauth\FilamentLoginMultiauthServiceProvider
plugin in the panel provider
file.
use Minhk\FilamentLoginMultiAuth\LoginMultiAuthPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
LoginMultiAuthPlugin::make(),
]);
}
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.