Questions tagged [laravel-livewire]

Livewire is a full-stack framework for Laravel that makes building dynamic interfaces simple, without leaving the comfort of Laravel.

Livewire is a full-stack framework for Laravel that makes building dynamic front-ends as simple as writing vanilla PHP (literally). Check documentation.

2060 questions
21
votes
11 answers

Laravel "Unable to locate a class or view for component" in production environment

I develop on a Mac locally. Latest version of Big Sur. Today I went to deploy my app to production via an Ubuntu server through Forge, and got greeted with an error I've never seen before, and can't find an answer to online. I can see MANY people…
Borassign
  • 621
  • 2
  • 7
  • 16
15
votes
4 answers

Attribute [livewire] does not exist

I am having trouble to run my code on Laravel 8 routing with laravel-livewire. The class is within Livewire\LandingPage. The error I'm getting is Attribute [livewire] does not exist Here are my routes
swatantra
  • 383
  • 1
  • 7
  • 18
15
votes
2 answers

laravel livewire, how to pass the id or data to another component by click

I have two components Posts and Post, Posts show the posts and by clicking the image I want to show the data of clicked post in another component. Posts class and component down below: Component View:
Mehdi Yaghoubi
  • 561
  • 3
  • 8
  • 24
15
votes
1 answer

Laravel Livewire component not refreshing/reloading automatically after refreshing it

So, I'm currently using Laravel Livewire in one of my projects. But when I try emit an event from one component to another component by magic mathod $refresh , its refreshing (got the dom in xhr request ) the total component but the Front end is not…
fahim152
  • 2,531
  • 1
  • 10
  • 29
14
votes
19 answers

Livewire encountered corrupt data when trying to hydrate the … component

I am getting the following error and am a bit lost on it: Livewire encountered corrupt data when trying to hydrate the … component. Ensure that the [name, id, data] of the Livewire component wasn’t tampered with between requests Situation is as…
Markus Köhler
  • 764
  • 2
  • 8
  • 20
13
votes
3 answers

Livewire how to $emit event on select change (wire:model)

Livewire how to $emit event on change. How to watch changes for this model? On…
RomkaLTU
  • 3,683
  • 8
  • 40
  • 63
13
votes
2 answers

How to refresh the component after the queue job is finished?

I have a table products and job_statuses using this package: laravel-job-status There is a column in job_statuses called status the package made this column finished once the queue job is finished! So I created a column in products table called…
user14375528
10
votes
2 answers

Laravel Livewire error "must not be accessed before initialization"

I try to using Livewire Binding Directly To Model Properties, and i get this error, Anyone help please ? Thank in advance. Typed property App\Http\Livewire\V2\Settings\Locations::$country must not be accessed before initialization class Locations…
Koung Buntha
  • 135
  • 1
  • 1
  • 9
9
votes
2 answers

Laravel Livewire error when I add a constructor to call a service class

I've got a piece of code I want to reuse. I've read this Laravel cleaner code article and this other Laravel Services Pattern article, where I have realized I can reuse code in several places of the application by using services classes. In this…
Pathros
  • 10,042
  • 20
  • 90
  • 156
9
votes
6 answers

laravel Livewire wire:click not firing the function

I want to do a SPA with laravel livewire, i want to use wire:click to fire a funtion in the component but it not working , excuse me if the code mess its my first time posting here and i am not sure of what to post here of my code to make these…
Mustafa Khaled
  • 133
  • 1
  • 1
  • 9
9
votes
3 answers

How to apply loading state only to particular component in livewire

I'm using Laravel Livewire in my project, I use wire:loading for loading the state while clicking. I iterated all the tasks in foreach loop but the loading state applies for all components. Here is the code. Blade file GitLab:…
Yogi
  • 609
  • 1
  • 8
  • 21
8
votes
1 answer

scroll to top of page - livewire component - alpine js

I have an app created with laravel livewire where I'm loading a livewire component with multiple nested components that display one at a time depending upon a status variable. When each nested component is displayed the page is scrolled to the…
Justin
  • 337
  • 6
  • 16
8
votes
2 answers

What does it mean to hydrate and dehydrate a Laravel Livewire component?

Could someone point me to a definition of "hydrate" and "dehydrate" as it applies to Livewire components? The only hit in the documentation search refers to Livewire will take care of hydrating and dehydrating the model between requests with the…
JohanTux
  • 382
  • 4
  • 11
8
votes
1 answer

Laravel Livewire, communication between two livewire components

I have 2 livewire components, 1st only displays the session variable of the cart and the 2nd one is just to add items in cart (a very raw form with sku, title, price and qty).
user3765227
  • 155
  • 1
  • 2
  • 11
7
votes
2 answers

Livewire wire:model on Select Option not working properly

I have a dropdown using wire:model