focela/support
最新稳定版本:v10.0.0
Composer 安装命令:
composer require focela/support
包简介
Flexible helper methods & traits for commonly used functionalities
README 文档
README
A support package that provides flexible and reusable helper methods and traits for commonly used functionalities.
Installation
composer require focela/support
Quick Start
In this section, we'll show how you can make use of the available traits.
EventTrait
The EventTrait makes it easy to add dispatching abilities to your classes.
<?php use Focela\Support\Traits\EventTrait; class FooRepository { use EventTrait; public function foo() { $this->fireEvent('foo'); } }
RepositoryTrait
The RepositoryTrait makes it easy to create new instances of a model and to retrieve or override the model during
runtime.
use Focela\Support\Traits\RepositoryTrait; class FooRepository { use RepositoryTrait; public function foo() { return $this->createModel(); } }
Contributing
We encourage and support an active, healthy community of contributors — including you! Details are in the contribution guide and the code of conduct. The support maintainers keep an eye on issues and pull requests, but you can also report any negative conduct to opensource@focela.com. That email list is a private, safe space; even the support maintainers don't have access, so don't hesitate to hold us to a high standard.
Released under the MIT License.
统计信息
- 总下载量: 562
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-06-26