xzxzyzyz / laravel-uuid-model
Uuid Model For Laravel
Installs: 2 654
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- illuminate/config: ^9.0|^10.0|^11.0
- illuminate/database: ^9.0|^10.0|^11.0
- illuminate/support: ^9.0|^10.0|^11.0
- ramsey/uuid: ^4.0
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: ^7.0|^8.0|^9.0
- phpunit/phpunit: ^9.5|^10.5
README
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 { //... }