owlondrugsmobile's avatar

owlondrugsmobile wrote a reply+100 XP

1mo ago

It looks interesting. But how can I make vue open the page as a modal? Using additional resolve?

owlondrugsmobile's avatar

owlondrugsmobile wrote a reply+100 XP

1mo ago

My controller:

Vue page:

This works, but this approach reloads the page, and if the table is complex or has a lot of data, it takes significantly longer to load.

As I mentioned above, I tried using Ajax requests, but then the application starts using two approaches: one is Ajax, the other is Inertia.

This works, but this approach reloads the page and if the table is complex or there is a lot of data, it takes a noticeable amount of time to load.

I have also tried loading additional data using only[] and preserveUrl, but when validation errors occur, the page breaks instantly due to Laravel's back() function.

owlondrugsmobile's avatar

owlondrugsmobile wrote a reply+100 XP

1mo ago

Yes, I need a more detailed explanation. I use it. Select you have users, you have roles (space). I need dictionaries with roles to be loaded to the main page via the controller for subsequent filtering. Using the create/edit route, I load either an empty modal or a modal with props embedded in it by sending Inertia::render to the same page with additional modal array data. How to do all these routes correctly and how to organize the architecture and code correctly? I noticed that when loading the create/edit pages, if we upload all the data again, there is a delay.

owlondrugsmobile's avatar

owlondrugsmobile started a new conversation+100 XP

1mo ago

How to make modal windows based on inertia v2 correctly? I tried making them with an ajax request. I also tried to use the philosophy of inertia and return all the page data through the passes, using the same page for rendering. But I still can't figure out how to simplify this process.