Closed aliqasemzadeh closed 2 years ago
Is this component inside a livewire component?
No It is not in livewire.
This component needs a livewire instance to work, because are using @entangle directive
I try to use it in livewire component but I have problem yet.
Same error? What's your livewire version? Can show more details?
livewire component:
<?php
namespace App\Http\Livewire\Panel;
use Livewire\Component;
class Panel extends Component
{
public $currency;
public function render()
{
return view('livewire.panel');
}
}
And view:
<x-panel-layout>
<x-inputs.currency
label="Currency"
placeholder="Currency"
thousands="."
decimal=","
precision="4"
wire:model="currency"
/>
</x-panel-layout>
You can test this code?
<div x-data="{ name: @entangle('name') }">
<span x-text="name"></span>
</div>
<php
...
public $name='testing';
...
@PH7-Jack Yet I get that error. Please guide me to fix it.
@alighasemzadeh what's your livewire and laravel version?
Laravel 8.74.0 Livewire 2.5.1 @PH7-Jack
Can check if don't has any component that uses @entangle
directive outside a livewire component?
@PH7-Jack How can I testit?
@alighasemzadeh you need to check in your base layout, check if has any blade component using @entangle
Check the route: if the route bind directly a livewire component https://laravel-livewire.com/docs/2.x/rendering-components#page-components Check the blade app layout
You need to find a wrong importation of wireui component (that using @entangle) or any other component or code using this directive
You can try too clear view
php artisan view:clear
@PH7-Jack
Fixed.
Just try to use full page component.
After I add currency input I get:
currency input code: