alzpk / larauuid
Small package that makes the use of uuid easy in laravel
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:package
Requires
- php: ^7.3|^8.0
This package is auto-updated.
Last update: 2024-10-25 23:51:40 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(); }); }