Download the PHP package duro85/ajaxauth without Composer
On this page you can find all versions of the php package duro85/ajaxauth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download duro85/ajaxauth
More information about duro85/ajaxauth
Files in duro85/ajaxauth
Package ajaxauth
Short Description a package to allow full ajax authentication for Laravel 5.3
License BSD-3-Clause
Homepage https://github.com/duro85/ajaxauth
Informations about the package ajaxauth
AjaxAuth (Laravel >=5.3 Package)
AjaxAuth it's a simple package that provides a fully configurable authorization/registration flow via ajax. It provides its controllers and publishes its configuration and its routes, which can then be changed at will.
Contents
- Installation
- License
- Contribution guidelines
Installation
1) In order to install AjaxAuth, just add the following to your composer.json. Then run composer update
:
2) Open your config/app.php
and add the following to the providers
array:
3) execute command :
this will publish routes, configurations and language files.
4) edit your model : in order to get a fully configurable Notification for the retrieve password email you have to insert this code into each Authenticatable model :
this method overrides the standard one and lets you manage EASILY your email notification. AjaxAuthNotification acepts three params : a $tocken (don't bother at it, it'll be provided by the framework ), a guard name ( to retrieve the right configuration ), and an optional array of params to be passed to an email view to personalize the message (cool huh ?). How this works ? Really simply, let's have a look to the code :
As you can see, the behaviour of this custom Notification it's influenced by the password config. array, to be more precise you can choose to set, in the config array, a 'view' key to specify a full custom email template or a 'route' key to use the standard email notification template but with a specific ( for the guard ) link, so you no longer have to have a single link to the password reset form, each guard will have its link ! Let me give you a couple of example :
5) configure your validators : this package will publish a ajaxauth.php into your config/ folder, this configuration file will store your guard' validators, let's have :
6) that's it ! Of course you still need to build forms and controllers to display them, but now you can let them work in AJAX !! ( such form, very ajax, much laravel ! )
License
AjaxAuth is free software distributed under the terms of the BSD-3-Clause license. Please refer to license.
Contribution guidelines
Support follows PSR-1 and PSR-4 PHP coding standards, and semantic versioning.
Please report any issue you find in the issues page.
Pull requests are welcome.