Laravel VueJs Pagination Keep the same page number after update - laravel

I'm having some trouble with pagination
I get data by the api from laravel backend and start navigating by laravel-vuejs-pagination package
<Pagination :data="laravelData" #pagination-change-page="getResults" />
When i click to update an entry in the table and finish updating.
when i return to the table i start navigation from the top from page 1 not the page where i was working.
Is there anyway to get Results and stay on same page?

Related

Is it possible to navigate through page by navbar without page refresh with Laravel Livewire and AlpineJS?

I am just wondering whether it's possible to navigate through navigation without any page refresh using Laravel Livewire and AlpineJS? I also want to keep the state of the clicked link of the navbar, so I can change it's color.
Thanks

Intertia modal - load view into a model for create, edit etc

Im using Laravel 9 with inertia. The design of the project includes modals for creating, updating but i see that inertia doesnt have support for modals?
I have found a few projects for inertia modals but they dont seem to work.
Currently when you navigate using inertia, Laravel hits the route and then in the controller you render an inertia page and vue knows to find a specific page and then navigates to that new page (loads it in a new vue page)
I am wanting to do the same but instead of a new page loaded i want to remain on the same parent page and load the new route content into a modal.
Thanks
If you want a blade view to be loaded inside a modal in an Inertia page you can do:
$modalContent = view('your-blade-view-name', $modalData)->render();
return Inertia::render('inertia-page', $inertiaData);
I created a demo repository for this

How to update resource detail view without reloading the whole page in laravel nova?

I'd like to update an element value without reloading the whole page on the resource detail view page. I made a custom card for the device status enable/disable button. And I displayed the resource detail below my custom card. If I switch the device status button, the device status is changed to 0 or 1 in database. I did it with axios without reloading the page. But the problem is I can't update the Status field on the resource detail view without reloading the whole page. If I reload the page, then the status field shows the changed status correctly. Please look at this for understanding - https://prnt.sc/sd3jut
How can I update Status field without reloading the whole page? If possible, I'd like to do this in axios return section.
Thanks.

Loading Laravel blase views using Vue

I have a Laravel project with a dashboard that contains a side menu. When navigating through this side menu, it refreshes the whole page (layout & view in blade). This is my dashboard:
1
I want to know how I'm able to load my blade views without page refresh. So that when I'm clicking on a navigation link, only the yielded content changes. How am I able to achieve this? Please don't mark this as a dublicate as I've visited most of the similar topics but without any succes.
Oh, and I'd appriciate it so bad if there's someone that's willing to help me out using Teamview.
views cannot be loaded that way with laravel. you will need to use components to design your pages with vue. with components in place you can now use vuerouter to load your pages that way.
Run php artisan preset vue to start your project using Vue.
To access a menu link without refresh the page, use <route-link to="..."></route-link>
https://router.vuejs.org/guide/#html

Symfony+Ajax+WebShop product details

I am starting to make webshop in Symfony and I am making details page using bootstrap modal. How can I make a request and then return the modal with product details after query to database using doctrine in controller?

Resources