-
-
Notifications
You must be signed in to change notification settings - Fork 142
Installation
Michael Lindahl edited this page Apr 12, 2018
·
10 revisions
Package requires PHP 7.0+ (v5.5) / PHP 5.6.4+ (v5.3|5.4) / PHP 5.5.9+ (v5.1|5.2) / PHP 5.4+ (v0.4) and works with Laravel 5+.
-
Require the package in your
composer.json
:# get all extensions composer require sofa/eloquence # get single extension, eg. Metable composer require sofa/eloquence-metable
-
Add
Eloquence
trait to the model - it's entry point for other extensions and is required for them to work. -
Add other traits, that you want to use.
-
Laravel 5.4 & Below Add
Sofa\Eloquence\BaseServiceProvider
to yourconfig/app.php
providers array. With Laravel 5.5 and above theBaseServiceProvider
is automatically registered. The BaseServiceProvider registers theMutator
as a service in the IoC Container as well as factories on theBuilder
class.