Support the ongoing development of Laravel.io →
Requests Input Forms
Last updated 1 year ago.
0

You're posting to new.php, which I would guess is not what you want (since laravel does not use .php).

It's depending, but using a relative URL in your Ajax call might or might not turn out to be correct. Try with the fully qualified URL.

You also have a parameter in your route, when I GUESS that you'd simply want "create/new".

Check the response in your console, it's probably not 2xx

Last updated 1 year ago.
0

What extension do I need to post my AJAX request to? I am still new to Laravel and am trying to learn how it works.

I also check the response and the status is 200. I am also able to return a simple 'Hello' string from my controller to my JavaScript so there is that connection between my AJAX request and my controller, so the two knows about each other but I can't get my AJAX data.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.