Download the PHP package desmart/password-reset without Composer

On this page you can find all versions of the php package desmart/password-reset. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package password-reset

Laravel Password Reset

Password reset mechanism for Laravel. The package provides endpoints and logic for a simple and easy way to allow your app's users reset their passwords.


Installation

Install package using Composer:

Register the package's service provider in config/app.php:

Run the Artisan's vendor:publish command:

This will copy the password-reset.php config file and the password_reset_init.blade.php email template into proper directories, allowing you the tweak them.

Run DB migrations:

The provided migration will drop the current password_resets table (if present) and create a new one.


Configuration

In order for the package to send emails to users, Laravel's mailer has to be configured. In order to do this, fill out these values in the .env file:

You have to make some changes in config/mail.php (as the file has some hardcoded defaults):

That's it, we're ready to go :)


Usage

The package provides three routes for handling password resets:

As you can see, the URI is the same for all requests - only the verbs are different.

Let's go briefly through these routes.

Initiate password reset

Sending a POST request will do the following:

An exception will be thrown if the user does not exist.

Fields required for this operation:

Verify token

This route is optional but you may want to use it in order to make sure that the user's ID and password reset token are both valid.

Sending a GET request will do the following:

An exception will be thrown if:

Fields required for this operation:

Set new password

Sending a PUT request will do the following:

An exception will be thrown if:

Fields required for this operation:


Custom behaviour

You can change nearly everything to suit your needs.

The package assumes you use the default User model. If you want to use a custom model - change in the password-reset.php config file.

The same file holds the info about the Password Reset model used and the password reset link pattern, sent in the email to the user.

Should you need to change the validators or handlers - you can always write your custom service provider that binds your classes to appropriate interfaces.

Don't like the routes provided by the package? Create your own service provider, remove the route loading section and define your own routes.

Change what you want :)


Notice

The package has no unit tests, sorry :( If you can provide any tests - that would be great.


All versions of password-reset with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
laravel/framework Version 5.4.*
desmart/laravel-commandbus Version dev-master
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package desmart/password-reset contains the following files

Loading the files please wait ....