| Package Data | |
|---|---|
| Maintainer Username: | beautycoding |
| Maintainer Contact: | antyrace@antyrace.com (AntyRace) |
| Package Create Date: | 2016-03-16 |
| Package Last Update: | 2016-06-20 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-12-17 03:03:27 |
| Package Statistics | |
|---|---|
| Total Downloads: | 126 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 2 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
In order to install Laravel 5 ModelUtils, just add
"beautycoding/modelutils": "dev-master"
to your composer.json. Then run composer install or composer update.
Then in your config/app.php add
BeautyCoding\ModelUtils\ModelUtilsServiceProvider::class,
Publish config:
php artisan vendor:publish
Edit config file config/modelutils.php with own namespace.
Use in proper model trait UuidModel:
<?php
use Illuminate\Database\Eloquent\Model;
use BeautyCoding\ModelUtils\Traits\UuidModel;
class User extends Model
{
use UuidModel; // add this trait to your model
...
}
Model has to have field named uuid (32characters long). Check RFC for more information.