Apps (Coming Soon) 12 / 32
Filament
Learn how to install DevDojo Auth within a new Filament application.
In this installation page we'll show you the steps to install Auth inside of a new Filament application.
1. Create a new Filament application
After creating a new Laravel application, you'll want to follow the Filament install guides here. This will get you up and running with a new Filament application.
After installing Filament we can go through the basic install steps:
2. Install the Package
Install the Auth package via composer:
composer require devdojo/auth
3. Publish the Files
Publish the assets, configs, CI workflow, and migrations:
php artisan vendor:publish --tag=auth:assets
php artisan vendor:publish --tag=auth:config
php artisan vendor:publish --tag=auth:ci
php artisan vendor:publish --tag=auth:migrations
4. Run Migrations
Run the database migrations:
php artisan migrate
5. Extend the DevDojo User Model
Your default User model needs the methods that handle 2FA and email verification. Add the following import to the top of App\Models\User.php:
use Devdojo\Auth\Models\User as AuthUser;
and extend the AuthUser class:
class User extends AuthUser
Enable the Name Field for Registration
The Filament admin panel utilizes the user name field, so you'll want to enable this option in the setup page.
You can do that by visiting the /auth/setup route, clicking on Settings, and enabling the Registration Include Name Field option.
That's it! The DevDojo Auth package is now successfully installed in your Filament application.