This is what you call ajax. It's a request done with Javascript which loads the data and puts it on the page
Is it possible to start rendering page content while data is being fetched in the background?
I probably misunderstood the question, so I'll try to explain in more detail. I need to get two things:
- products from the catalog
- available product attributes
It is elementary to get products from the catalog and if you use pagination, then very quickly. In order to get all the possible attributes of the products, more time is needed.
The question is the following - can I pass product data to the "view" with the received products, and load the available attributes in the background. And until I get this data, then display "loading" in the sidebar.
I read on some forum that it is possible to call a function from "view" that will access the database and only then receive data by attributes. It seems to me that this approach is absolutely wrong and violates common sense. What do you advise?
@Rediska as laravel is a php framework and you need Javascript, it does not. But if you add livewire, it's pretty simple
Please or to participate in this conversation.