it-can / laravel-model-traits
My custom Laravel 5.3+ model traits
Installs: 375
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:package
Requires
- php: >=5.6.4
This package is auto-updated.
Last update: 2019-02-20 19:26:28 UTC
README
My custom Laravel 5.4+ model traits
MIT License
use at your own risk!
to use add this to composer.json:
"it-can/laravel-model-traits": "dev-master"
to use in a Model:
use ITCAN\laravelModelTraits\RandomOrderByTrait; * REMOVED, LARAVEL 5.2+ has now inRandomOrder() function *
use ITCAN\laravelModelTraits\TableNameTrait;
use ITCAN\laravelModelTraits\Encryptable;
then use within the class:
use RandomOrderByTrait; * REMOVED *
use TableNameTrait;
use Encryptable;
To use the Encryptable trait in your model, add an array to your model.
protected $encrypted = [
'email',
];
The email field will now be encrypted / decrypted...