calebdw/larastan-livewire
Install
composer require calebdw/larastan-livewire --dev
If you have the PHPStan extension installer installed then nothing more is needed, otherwise you will need to manually include the extension in the phpstan.neon(.dist) configuration file:
includes:
- ./vendor/calebdw/larastan-livewire/extension.neon
Features
Computed Properties
Computed properties are properly resolved from methods that have the Computed attribute applied.
<?php
use Livewire\Attributes\Computed;
use Livewire\Component;
class ShowPost extends Component
{
#[Computed]
public function post()
{
return Post::find($this->postId);
}
}
Getter Style
The older, "getter" style attributes are supported as well:
<?php
use Livewire\Component;
class ShowPost extends Component
{
// Computed Property
public function getPostProperty()
{
return Post::find($this->postId);
}
}
Contributing
Thank you for considering contributing! You can read the contribution guide here.
License
Larastan-Livewire is open-sourced software licensed under the MIT license.
Related Packages
Helps find missing translation strings in Laravel applications
Lumenstan - Discover bugs in your code without running it. A phpstan/phpstan wra...
Larastan - Discover bugs in your code without running it. A phpstan/phpstan exte...
Opinionated Laravel 13 + Livewire 4 starter kit, wired for strict types, Pest, P...
🧪 Tools needed for PHP and Laravel project development and automation.