alzpk / larauuid
Small package that makes the use of uuid easy in laravel
1.0.0
2022-04-25 18:23 UTC
Requires
- php: ^7.3|^8.0
This package is auto-updated.
Last update: 2026-02-26 02:39:37 UTC
README
Small package that makes the use of uuid easy in laravel
Installation
To install this package, run the following composer command, inside your laravel project.
composer require alzpk/larauuid
Usage
To use this package simply use Alzpk\Larauuid inside your model.
Example:
namespace App\Models; use Alzpk\Larauuid\Larauuid; use Illuminate\Database\Eloquent\Model; class Post extends Model { use Larauuid; }
Remember to use uuid on the migrations like so:
public function up() { Schema::create('posts', function (Blueprint $table) { $table->uuid('id')->primary(); $table->string('title'); $table->text('message'); $table->timestamps(); }); }