Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mallaury's avatar

Best way to populate a blade view from ajax response

Hello,

I am developing an infinite scroll system. During the synchronous loading of the page, 50 elements are loaded and during the scroll 50 new elements are loaded, etc.

I would like to use the same blade view for these two cases. I do not want to build manually the html with javascipt.

For the moment, I generate the html in back and I send it directly in ajax response. But I don't like this way of doing.

Is there a better way to do it ?

Thanks !

0 likes
2 replies
mallaury's avatar

@webrobert Thanks, I just watched the videos. I am already doing that. But I didn't really like this solution because it requires sending more bits on the network. But I guess this is the only solution...

1 like

Please or to participate in this conversation.