Skip to content
A Laravel API package to generate password recovery routes for API routes.
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
src
tests
.gitignore
.styleci.yml
README.md
composer.json
composer.lock
phpunit.xml.dist

README.md

Laravel: API forgotten password helper

Introduction

Save time creating functions to manage forgotten passwords in laravel for your Api's. This package will add a new key to your users model, along with two new routes that will handle the forgotten and reset password.

Quick Usage

Composer

composer require appoly/api-password-helper

Usage

Add the new key to your users table.

php artisan migrate

The Users Model needs to be Notifiable as an email will be automatically sent to them

class User extends Authenticatable
{
    use Notifiable;

Routes

Two new routes will be created in your application

GET: /api/forgot-password?email=johndoe@example.com

The Post route takes two form data parameters in the request key and password.

POST: /api/forgot-password

SmartSchema Compatibility

If you are using SmartSchema to manage your models fillables then add SmartField to your model

class User extends Authenticatable
{
    use Notifiable, SmartField;
You can’t perform that action at this time.