You can't pass data from view to view. Every view is associated with a controller. you need to make a call to the next view's controller. My suggestion would be to spend half a day watching tutorials on you tube so that you can understand the concepts.
Thanks sbasi5576. I've actually been through quite a few videos at this stage. I get the concept of controllers and I'm already using them to get JSON data from my API as I mentioned above. The problem is that if I make a call to the next view's controller I'm going to (as far as I understand it) have to get the data all over again which is not efficient. I'm trying to figure how to get a subset of the data I already have in my view to the next view i.e. the detail view.
softwaredeveloperca said:
Write the content to a hidden div and unhide it onclick
that doesn't follow with my UI flow unfortunately. There is a slew of data needed on the detail view which wouldn't suit showing it 'inline' and with multiple properties the weight of the page might be bigger than I'd like. I had thought Laravel might have a strategy for persisting data between views. Had a look at composers but that's not a good fit for me. For the moment I'll probably just pull the individual property info from the API using a new controller and then look at other ways to store the property data, maybe JSON stringify the data to localStorage, not sure. Anyway, thanks softwaredeveloperca, I'll pass anything 'Laravel'-ian to the forum if I find a good fix,
cheers
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community