samedi 26 novembre 2016

Laravel password recovery template

I have the following code which sends a passowrds recovery mail:

public function recovery(Request $request)
    {
        $validator = Validator::make($request->only('email'), [
            'email' => 'required'
        ]);

        if($validator->fails()) {
            throw new ValidationHttpException($validator->errors()->all());
        }

        $response = Password::sendResetLink($request->only('email'), function (Message $message) {
            $message->subject(Config::get('boilerplate.recovery_email_subject'));
        });

        switch ($response) {
            case Password::RESET_LINK_SENT:
                return $this->response->noContent();
            case Password::INVALID_USER:
                return $this->response->errorNotFound();
        }
    }

Which I found out uses the following template: resources/views/auth/emails/password.php

which is an empty file.

How I can access the token from this template?

Isn't there any built-in view to use from laravel?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2gr0SdR
via IFTTT

Aucun commentaire:

Enregistrer un commentaire