mercredi 23 mai 2018

Laravel 5.2 Reset Password

I tried to follow some suggestions online, but each one seems to be telling a different story.

I use react as a front-end, so im not using all the built-in forms.

So, my user has forgotten his/her password.

I have a Modal to ask for the email address of the account. Only if this exists in the user table will a email be sent.

On sending the email I get the following error. Class guest does not exist

Route::post('password/email', 'Auth\PasswordController@sendResetLinkEmail');

<?php namespace App\Http\Controllers\Auth;
use Illuminate\Contracts\View\View;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Password;



class PasswordController extends Controller {

    /*
    |--------------------------------------------------------------------------
    | Password Reset Controller
    |--------------------------------------------------------------------------
    |
    | This controller is responsible for handling password reset requests
    | and uses a simple trait to include this behavior. You're free to
    | explore this trait and override any methods you wish to tweak.
    |
    */

    use ResetsPasswords;

    /**
     * Create a new password controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('guest');
    }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire