Skip to content

BeautyCoding/modelutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ModelUtils (Laravel 5 Package)

Latest Stable Version Total Downloads Latest Unstable Version License

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.