Skip to content
Advertisement

How To Load data using livewire instead of ajax?

i have this perfectly working example using ajax !

>>>>ajax example ..

im using this code to load data whenever click on the nav bar :

JavaScript

is it possible to do the same actions using livewire laravel ? the goal is to navigate through the menu and show data in the div whenever i click one of the nav-buttons ! if it is possible ill be happy with a suggetion or should i just go with ajax ??

Advertisement

Answer

Component

Update the livewire component like the following Sample

JavaScript

Blade

Change the blade file like the following sample.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement