A support package that provides flexible and reusable helper methods and traits for commonly used functionalities.
composer require focela/support
In this section, we'll show how you can make use of the available traits.
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');
}
}
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();
}
}
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.