calebdw/larastan-livewire
最新稳定版本:v2.3.0
Composer 安装命令:
composer require --dev calebdw/larastan-livewire
包简介
A Larastan / PHPStan extension for Livewire.
README 文档
README
A Larastan / PHPStan extension for Laravel 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.
统计信息
- 总下载量: 322.3k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 36
- 点击次数: 1
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-22
