Download the PHP package laravolt/auth without Composer
On this page you can find all versions of the php package laravolt/auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laravolt/auth
More information about laravolt/auth
Files in laravolt/auth
Package auth
Short Description Laravel auth extended
License MIT
Homepage https://github.com/laravolt/auth
Informations about the package auth
laravolt/auth
Laravel authentication with some additional features:
- Activation
- Enable/disable registration
- Captcha
- Custom email template
- Functionally tested
Installation
- Run
composer require laravolt/auth
- For Laravel 5.4 or below, add
Laravolt\Auth\ServiceProvider::class
as service providers - Optionally, you can run
php artisan vendor:publish --provider="Laravolt\Auth\ServiceProvider" --tag="migrations"
to publish migrations files for further editing
Configuration
Captcha
If you enable captcha (by setting 'captcha' => true
in config file), please add following entries to .env
:
You can obtain them from www.google.com/recaptcha/admin.
Custom Login Form
Modify Form (View File)
Run php artisan vendor:publish --provider="Laravolt\Auth\ServiceProvider"
.
You can modify the view located in resources/views/vendor/auth/login.blade.php
.
Modify Logic
Create new class to handle user login that implements Laravolt\Auth\Contracts\Login
contract.
You must implement two method related to registration:
rules(Request $request)
to get validation rules.credentials(Request $request)
to check valid credentials. optionally:authenticated(Request $request, $user)
to handle after login, it should be returned\Illuminate\Http\Response
ornull
failed(Request $request)
to handle custom failed response
Custom Registration Form
Sometimes you need to modify registration form, e.g. add more fields, change logic, or add some validation. There are several way you can accomplish those.
Modify Form (View File)
Run php artisan vendor:publish --provider="Laravolt\Auth\ServiceProvider"
.
You can modify the view located in resources/views/vendor/auth/register.blade.php
.
Modify Logic
Create new class to handle user registration that implements Laravolt\Auth\Contracts\UserRegistrar
contract.
You must implement two method related to registration:
validate($data)
to handle validation logic.register($data)
to handle user creation logic. optionally:registered(Request $request, $user)
to handle after registration is completed, it should be returned\Illuminate\Http\Response
ornull
Modify Activation Logic
add Laravolt\Auth\Contracts\ShouldActivate
implementation to your registration.implementation
class by add these function to your registrar class.
notify(Model $user, $token)
activate($token)
After that, you must update auth config (located in config/laravolt/auth.php
, if not, just run php artisan vendor:publish
).
LDAP
Environment Variables
All versions of auth with dependencies
illuminate/support Version 5.6.*|5.7.*|5.8.*|^6.0
illuminate/auth Version 5.6.*|5.7.*|5.8.*|^6.0
illuminate/mail Version 5.6.*|5.7.*|5.8.*|^6.0
anhskohbo/no-captcha Version ^3.0.1
doctrine/dbal Version ~2.5
laravolt/ui Version ~0.5
laravolt/password Version ^1.6