Looking to hire Laravel developers? Try LaraJobs

laravel-uuid-model maintained by dtt

Description
Uuid Model For Laravel
Author
Last update
2023/05/16 06:12 (dev-master)
License
Links
Downloads
23
Tags

Comments
comments powered by Disqus

Laravel Uuid Model

Build Status Latest Stable Version License

Using uuid in eloquent model.

Installation

composer require dtt/laravel-uuid-model

Usage

Create primary key as string type.

/**
 * Run the migrations.
 *
 * @return void
 */
public function up()
{
	Schema::create('example', function(Blueprint $table) {
		$table->uuid('id')->primary();
		// ...
	});
}

And, Extends DT\Laravel\Uuid\Model in your model.

use DT\Laravel\Uuid\Model;

class Example extends Model
{
	//...
}