mardi 16 octobre 2018

object not found Error 404 when resetting the password in laravel

i have tried to send the password reset link form mialtrap server to my application but i got the error object not found 404 this my code the controller

class ResetPasswordController extends Controller
{
//
     use ResetsPasswords;
    protected $redirectTo = 'dashboard';

    public function __construct()
    {
        $this->middleware('Auth');
    }


    public function guard()
    {
        return Auth::guard();
    }

    public function broker()
    {
    return password::broker();
    }
public function showResetForm(Request $request, $token)
{
    return view('users.passwords.reset')->with(
        ['token' => $token, 'email' => $request->email]
    );
    }
}

this is the notification

     public function toMail($notifiable)
    {
    $notifiable->email = $this->email;
    $url = url('password/reset/{token}'.$this->token);
    return (new MailMessage)
                ->line('you receiving this email because we received a 
 password reset from your account.')
                ->action('Reset Password', $url)
                ->line('Thank you for using our application!');
    } 

this the route

Route::get('password/reset', 'ForgotPasswordController@showLinkRequestForm')
->name('password.request');
Route::post('password/email','ForgotPasswordController@sendResetLinkEmail')
 ->name('password.email');
Route::get('password/reset/{token}', 
'ResetPasswordController@showResetForm')->name('password.reset');
Route::post('password/reset', 'ResetPasswordController@reset');

this is the model

 public function sendPasswordResetNotification($token)
{
    //using facade
    Notification::send(new ResetPasswordNotification($token));
    /*$this->notify(new ResetPasswordNotification($token));*/
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire