Looking to hire Laravel developers? Try LaraJobs

laravel-uuid-model maintained by xzxzyzyz

Description
Uuid Model For Laravel
Author
Last update
2026/03/18 03:55 (dev-master)
License
Links
Downloads
2 904
Tags

Comments
comments powered by Disqus

Laravel Uuid Model

Build Status Latest Stable Version License

Using uuid in eloquent model.

Installation

composer require xzxzyzyz/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 Xzxzyzyz\Laravel\Uuid\Model in your model.

use Xzxzyzyz\Laravel\Uuid\Model;

class Example extends Model
{
	//...
}