Replies: 1 comment 2 replies
-
just try public string $type=''; |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Passing a variable.
<livewire:user.table type="user" />
`<?php
public string $type;
public function mount($type)
{
$this->type = $type;
}
public function builder(): Builder
{
User::query()
->where('signup', $this->type === 'user')
});
}
`
But I get this error.
Typed property App\Http\Livewire\User\Table::$type must not be accessed before initialization
Beta Was this translation helpful? Give feedback.
All reactions