Rather than me trying to pinpoint the exact error in your code let me give you two suggestions to try first:
Use Tinker to test the main statement calls you are making to ensure you get the data you expect. This is a quick way to find bugs or typos.
Stub out your controller with a static Jason return and then call it from jQuery. Also make sure your network console is open in your browser so you can inspect the request.
Both of these approaches will help you work toward solid code vs. simply writing a page of code and not knowing where to start troubleshooting. Smaller chunks are much easier to test and will keep you confident with the end result.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community