Argument 1 passed to Livewire\LivewireManager

I updated to Livewire 1.0.3. First I received an error about using a property called “id”, so I renamed my properties.

Now I receive this error:
Argument 1 passed to Livewire\LivewireManager::resolveClassMethodDependencies() must be of the type array, object given, called in C:\laragon\www\Livewire\vendor\livewire\livewire\src\LivewireManager.php on line 105 (View: C:\laragon\www\Livewire\resources\views\dashboard.blade.php)

This worked before I updated. Why can’t I use objects? This is Laravel.

Can you share the Code

I went through the LivewireManager code, and I’m pretty sure it’s caused by how you are calling your livewire component in a view somewhere. It’s looking for an array in the second arguement when you use @livewire in a view unless you use key() as the second.

Take a looke here, specifically at the first notes:

Convert initial component parameters to key->value array

@livewire('show-user', $user, now())

@livewire('show-user', ['user' => $user, 'currentTime' => now()])

I have a good feeling you are doing the before and need to change it to the after.


I knew that someone would see it.

That is exactly what it was!!


Perfect solution, this has been helpful to me