Download the PHP package willishq/laravel-components without Composer
On this page you can find all versions of the php package willishq/laravel-components. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-components
Laravel components
These are components which I use frequently when creating and maintaining a Laravel project, and two traits which I keep copying from project to project.
Installation
Grab this package through Composer:
Traits
The two traits provided are the EventableTrait
and the RetrievableTrait
.
EventableTrait Usage
The EventableTrait
is used in tandem with laracasts\commander
package and enables you to raise and dispatch events
directly on your objects (such as Eloquent models), along with firing events when the object is destroyed.
MyModel.php
if you left the model like this, the event would be fired automatically by the __destruct
method, or you can call
$model->dispatchEvents();
which would dispatch all remaining events.
RetrievableTrait Usage
The RetrievableTrait
enables you to retrieve specific public
keys from your objects. It provides you with two methods,
retrieveOnly
and retrieveExcept
I have found this useful when dealing with DTO's.
Packages
Please be sure to add the following to your config/app.php
file to use the packages!
Service Providers:
Facades:
Other packages included are: laracasts/presenter
and league/fractal
.
Documentation for all of the packages included can be found here:
- fractal.thephpleague.com
- github.com/laracasts/Presenter
- github.com/laracasts/flash
- github.com/laracasts/commander
- github.com/barryvdh/laravel-debugbar
For development and testing, I suggest you use codeception/codeception
, laracasts/testdummy
and fzaninotto/faker
All versions of laravel-components with dependencies
illuminate/support Version 5.0.*
laracasts/commander Version ~1.0
laracasts/presenter Version ~0.2.0
laracasts/flash Version ~1.0
barryvdh/laravel-debugbar Version 1.*
league/fractal Version 0.8.*
illuminate/html Version ~5.0