This package provide a bunch of authentication features.
You can install the package via composer:
composer require mawuekom/laravel-passauth
Once install, go to config/app.php
to add PassauthServiceProvider
in providers array
Laravel 5.5 and up Uses package auto discovery feature, no need to edit the config/app.php
file.
'providers' => [
...
Mawuekom\Passauth\PassauthServiceProvider::class,
],
php artisan vendor:publish --provider="Mawuekom\Passauth\PassauthServiceProvider"
Or you can publish config
php artisan vendor:publish --provider="Mawuekom\Passauth\PassauthServiceProvider" --tag="config"
- You can change connection for models, models path and there is also a handy pretend feature.
- There are many configurable options which have been extended to be able to configured via
.env
file variables. - Editing the configuration file directly may not needed because of this.
- See config file: passauth.php.
<?php
/*
* You can place your custom package configuration in here.
*/
return [
/*
|--------------------------------------------------------------------------
| Users feature settings
|--------------------------------------------------------------------------
*/
'user' => [
'model' => App\Models\User::class,
'name' => 'User',
'resource_name' => 'user',
'table' => [
'name' => env('PASSAUTH_USERS_DATABASE_TABLE', 'users'),
'primary_key' => env('PASSAUTH_USERS_DATABASE_TABLE_PRIMARY_KEY', 'id'),
],
],
/*
|--------------------------------------------------------------------------
| Password history config
|--------------------------------------------------------------------------
*/
'password_history' => [
'enable' => true,
'checker' => false,
'number_to_check' => 3,
],
/*
|--------------------------------------------------------------------------
| Required identifiants
|--------------------------------------------------------------------------
*/
'required_identifiants' => [
'email' => true,
'phone_number' => false,
],
/*
|--------------------------------------------------------------------------
| Bunch of features to enable or disable.
|--------------------------------------------------------------------------
*/
'enable' => [
'email_verification' => false,
'proper_names' => false,
'agree_with_policy_and_terms_data' => true,
'last_login_data' => true,
],
'agree_with_policy_and_terms_column' => [
'name' => 'has_agreed_with_policy_and_terms_at',
'type' => 'timestamp'
],
'last_login_column' => [
'name' => 'last_login_at',
'type' => 'timestamp'
],
];
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.