Every time I try to make a POST request with jQuery I keep receiving back the 404 error.
This is the UserController.php
:
class UserController extends BaseController {
public function signUp($username, $password, $email) {
$user = new User();
$user->setUsername($username);
$user->setPassword($password);
$user->setEmail($email);
return 'OK';
}
}
And this is the routes.php
:
Route::get('/signup', function(){
return View::make('signup');
});
Route::post('/signup/{username}/{password}/{email}', 'UserController@signUp');
I always receive this error:
POST http://192.168.0.102/webname/public/signup 404 (Not Found)
Why is that? If I try to navigate to http://192.168.0.102/webname/public/signup
the page is loaded and the signup form is shown.