I get the following error and i dont know what do, HELP!
Unable to resolve dependency [Parameter #0 [ <required> $id ]] in class
FacturaComponent renders the table blade right? How you are handle the create and edit methods…modals, forms? The issue is related with parameter, like you’re trying to bind some data to another component
so…it’s working now? did you manage the issue?
I have the same issue
and what about the __construct??? if you have the mount method why do you declare that?
and where is the edit blade?
I assume that you have something like this:
factura-component.blade.php
<div>
<div>
@livewire('livewire.factura.$view')
<div/>
<div>
@livewire('livewire.factura.table')
<div/>
<div/>
So you need two blades for ‘create’ and ‘edit’
Hey, @LfJohnVo
Make sure you passed $id
is not null and try to do this instead
<button wire:click="$set('edit', {{ $factura->id }})">Edit</button>
Hey!!!, it doesnt works!!!
im still have the same error
Make sure you are passing the $id
and is not null or something …
I think that the matter is in FacturaComponent and the $id that is expecting to be load in mont() and _construct. If FacturaComponent list all the facturas, why the __construct($id)??? And the mount($contrato_id) you are binding as well this parameter?
I finally get the solution, my query was wrong
This info solved my problem. Thanks. again