/laravel-auditable-uuid

Just test how to make package

Primary LanguagePHP

This is Auditable Laravel with Uiid Package

Install via Composer

composer require zitech/laravel-auditable-uuid

Publish

php artisan vendor:publish

set ziAuditable.php set 'useUuid' => true,

Usage

Schema::create('users', function (Blueprint $table) {
    $table->uuid('id');
    $table->string('name', 100);
    $table->auditable();
	$table->primary('id');
    $table->timestamps();	
});

drop migrations

Schema::create('users', function (Blueprint $table) {
    $table->dropAuditable();
});

on User model

namespace App;

use Zitech\LaravelAuditableUuid\AuditableTrait;

class User extends Model
{
    use AuditableTrait;
    public $incrementing = false; 
	...................
}

*** Note ***

this is just test package