0
votes

I'm trying to enable reset password but I have troube with configuration so I made my function in controller to do it.

Route::post('/reset_password/{email}','MyController@resetPassword');

Now, In password.reset and password.email how to route to this /reset_password

    <form class="form-horizontal" method="POST" action="{{ route('password.email') }}">

<form class="form-horizontal" method="POST" action="{{ route('password.request') }}">
2
Make sure your routes have a ->name() or "as" => "..." setting when trying to use named route function route("name"). See laravel.com/docs/5.5/routing#named-routes for more infoTim Lewis

2 Answers

0
votes

Just add a name for routes

Route::post('/reset_password/{email}','MyController@resetPassword')
->name('password.email');
0
votes

Try to give a name to your route:

 Route::post('/reset_password/{email}', 'MyController@resetPassword')
        ->name('password.email');

Then in your View:

<form class="form-horizontal" method="POST" 
      action="{{ route('password.email', ['email' => $email]) }}">

Named Routes documentation

Or you can use url helper:

Route:

 Route::post('/reset_password/{email}', 'MyController@resetPassword');

View:

 <form class="form-horizontal" method="POST" 
       action="{{ url('/reset_password/'. $email) }}">