Livewire does not work?

Livewire simple live search does not work?

Livewire

Livewire gives Laravel easy to set up javascript actions in your project. You complete the action without refreshing the page. For live search results, quick like and dislike buttons or even CRUD.

Why it does not work in my project?

Well, it is very simple to install and ready for your project. But in some cases, you would need to remove the cache from your laravel project.

So do this in your CMD: php artisan optimize:clear

You can clear the route, cache, and others one by one, but the above command will make it all in once.

Livewire clear cache

Clear views. Application cache, Route cache, and Config cache in one command.

Still not working?

You still face the same as given in the below image, then do one more step.

Put this in CMD: composer dumpautoload

If you still face the same problem do these.

New setup require you to publish the config file. To serve the javascript by your web server, use the php artisan livewire:publish --assets

php artisan livewire:publish --config
php artisan livewire:publish --assets
Livewire not working

In the above image, you see the message appears but the text box has no text.

Works here properly

You can see in the below image the message changed according to the textbox.

Livewire working

Final

Clear cache: php artisan optimize:clear

Dump: composer dumpautoload

Related Posts