To install DevDojo Auth, require the package via Composer, publish the necessary assets and configurations, run migrations, and extend the base User model.
1. Install the package
composer require devdojo/auth
2. Publish assets and configurations
Run the following commands to publish authentication assets, configs, CI files, 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
3. Run migrations
php artisan migrate
4. Extend the User Model
Update your App\Models\User model to extend the DevDojo Auth User model:
use Devdojo\
Auth\\Models\\User as AuthUser;
class User extends AuthUser
{
// ...
}
composer require devdojo/auth
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
php artisan migrate