Support the ongoing development of Laravel.io →
posted 9 years ago
Requests
Last updated 1 year ago.
0

I created Forret for pretty much this exact situation. The frontend fo the site makes internal api calls using the same endpoints that a mobile device would hit. https://github.com/appitventures/Forret

Last updated 1 year ago.
0

Thanks for your reply, michael.

I'm curious, though. How do others handle this sort of situation?

Last updated 1 year ago.
0

Using the same API and marshalling the data received into the proper view structure is pretty standard. With the JS/HTML side you'd usually just be able to loop over the selection and inject it into templates without much issue. With ObjC, you'd just shove that data into a model for the UITableView or whatever to use. I will say though if you need multiple bits of data on a single view - like the table view data and then a few other bits, you should create an optimized endpoint that will provide all of the data in a single request rather than making multiple.

Last updated 1 year ago.
0

Thanks, machuga. It helps to hear another's viewpoint on this so I don't go down this path blindly. It seems parsing the JSON response in my blade template via JS isn't so out-of-standard as I assumed.

I agree with your point about a single request, definitely.

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.