Skip to content

Laravel Filament: Login With Email Or Username (In One Field)

License

Notifications You must be signed in to change notification settings

minhkhoablieu/filament-login-multiauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filament Login MultiAuth

Filament Login MultiAuth

Latest Version on Packagist

Login With Email Or Username (In One Field)

Installation

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]

Usage

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(),
        ]);
}

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Laravel Filament: Login With Email Or Username (In One Field)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages