Closed joydeep-bhowmik closed 8 months ago
Just works for me.
Just works for me.
any possible reason it's not working for me? I did clear the compiled views My livewire version: 3.4 My volt version:1.6.2
I installed volt with breeze
<x-slot name="header">
Initial value: {{ $count }}
</x-slot>
This $count
variable is returning undefined not the $count
variable inside volt directive
Same error happening with me too. Have you found a solution?
Versions : livewire/livewire : ^3.5 (v3.5.9) livewire/volt : ^1.6 (v1.6.5) laravel/framework : ^11.9(v11.26.0)
Same error happening with me too. Have you found a solution?
Versions : livewire/livewire : ^3.5 (v3.5.9) livewire/volt : ^1.6 (v1.6.5) laravel/framework : ^11.9(v11.26.0)
nope still no solution to this ... seems like livewire variables are only available within volt directives
nope still no solution to this ... seems like livewire variables are only available within volt directives
Mine was solved when I called the component from a blade file. I was returning the component directly from a route like;
Route::view('counter', 'livewire.counter');
I changed it to
Route::view('welcome');
And in the welcome.blade.php
I put :
<livewire:counter />
Were you also trying to return the component from the route file?
nope still no solution to this ... seems like livewire variables are only available within volt directives
Mine was solved when I called the component from a blade file. I was returning the component directly from a route like;
Route::view('counter', 'livewire.counter');
I changed it to
Route::view('welcome');
And in the
welcome.blade.php
I put :<livewire:counter />
Were you also trying to return the component from the route file?
That's the solution to the issue. But to solve the issue, alternatively a full page component render would work as well:
use Livewire\Volt\Volt;
Volt::route('/counter', 'counter');
Volt Version
1.6.2
Laravel Version
10.10
PHP Version
8.2.12
Database Driver & Version
No response
Description
This example returns Undefined variable $count for
Initial value: {{ $count }}
Steps To Reproduce
just install volt 1.6.2 and use the mentioned example