You used the get() method on the route, but your form's attribute method is set to POST. Just change the route to
// Use post instead of get
Route::post('check_username/{username}', 'WelcomeController@checkUsername');
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi everyone. I'm kinda new to Laravel. I'm using v5.5. I want to achieve something like http://www.chatiw.com homepage registration form. I'm trying to create a custom registration system using a new controller. This is what I want to achieve: when a user fills in the form and clicks the submit button, a jQuery Ajax api sends a get request at the backend to check some specific requirements before User::create() does his thing. But when I try it, I get an error
Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException
No message
Here's the code https://pastebin.com/Facdf5Ux . I even added a new route:
Route::post('check_username/{username}', 'WelcomeController@checkUsername');
I now added in routes/web.php
Route::post('/', 'WelcomeController@index');
but still facing same error. 2- Then i did some research and found this: https://ysk-override.com/Multi-Auth-in-laravel-54-Registration-20170202 . I followed all the steps in there but after submitting, nothing happens. I get stuck with the registration page. So can anyone help with this issue?
Please or to participate in this conversation.