Hi in my login page I have forgot password link. From where I have to send the reset password links to the users. I hope I did everything correctly, but still I am getting the " MethodNotAllowedHttpException " Error.
HTML Code
<form action="/user/sendresetlink" method="post" id="forgot_password_form" name="forgot_password_form">
<label for="name" class="col-xs-4 control-label">User Name</label>
<input type="text" id="user_name" name="user_name" class="form-control" />
<button type="submit" class="btn bg-olive btn-block">Send</button>
</form>
Router Code
Route::resource('user', 'UserController');
Here I Have mentioned resource for UserController, where laravel takes care of basic CRUD routings.
Route::get('login', 'UserController@create');
Route::post('/user/store','UserController@store');
Route::get('logout', 'UserController@destroy');
Route::get('forgot_password','UserController@forgotPassword');
Route::post('sendresetlink','UserController@sendResetLink');
I have mentioned the sendresetlink as post and calling the controller. It is not even going to controller.
Route::group(array('before' => 'auth'), function()
{
Route::get('/jobs', 'JobsController@jobs_list');
});
Controller Code
public function sendResetLink()
{
$form_data = Input::all();
echo '<PRE>';
print_r($form_data);
exit;
}
What am I doing wrong here? Am I missing anything?
Note: I have installed laravel in another machine and copied over the code to current machine. May be because of that, my php artisan is not working. When ever I tries php artisan in command prompt, it is stating that 'php' is not recognized as any internal external command. I tried to install the composer in the php.exe folder. Even then also no use.