phpstan: Access to an undefined property App\Livewire\RegisterPage::$form.

When creating a form like described in the docs at https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component#adding-the-form then I get the following PHPStan message. Is the documentation still up to date or do I have to set it differently? What about autocompletion?
4 Replies
toeknee
toeknee13mo ago
What is the following message? You probably need to define the fields in the model so phpStan knows they exist
wulfheart
wulfheartOP13mo ago
Sorry: phpstan: Access to an undefined property App\Livewire\RegisterPage::$form. But of what type is the $form property? I can't find it in the docs.
ChesterS
ChesterS13mo ago
@wulfheart This is probably the Filament\Forms\Form class
Lara Zeus
Lara Zeus13mo ago
add
/**
* @property mixed $form
*/
/**
* @property mixed $form
*/
on top of the class
Want results from more Discord servers?
Add your server