Level 73
Without the error message it's impossible to say what is wrong.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have two AJAX requests, one is working but the second one is not working. I add codes to github and this is the link, https://github.com/sameerakularathna/AJAX-error/tree/main
if you can help me to solve this error
@Sameera like @volkanador pointed out, your route is wrong
This
Route::get('/getInfo}', [App\Http\Controllers\PaymentsController::class, 'getInfo'])->name('getInfo');
Should be this
Route::get('/getInfo', [App\Http\Controllers\PaymentsController::class, 'getInfo'])->name('getInfo');
And I also recommend importing the namespaces, it makes your code so much more readable.
use App\Http\Controllers\PaymentsController;
Route::get('/getInfo', [PaymentsController::class, 'getInfo'])->name('getInfo');
Please or to participate in this conversation.