Download the PHP package adamlien/pkuuids without Composer
On this page you can find all versions of the php package adamlien/pkuuids. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package pkuuids
Using a UUID as PrimaryKey for Laravel 5.3+
PkUuids package use ramsey/uuid
[https://github.com/ramsey/uuid] (official installed on 5.3+) to generate a UUID_v4(random) as primary key for Eloquent Model
.
inspired by http://stackoverflow.com/questions/31817067/laravel-5-using-a-uuid-as-primary-key
Install
- Use composer to add the package into your project
using
composer require racklin/pkuuids:dev-master
Migrations
Use a UUID as primary key, we need to change $table->increments('id');
to $table->uuid('id')->primary();
Models
Disable auto-increment primary key
Add $incrementing = false;
to your Models.
Use Traits
Add use PkUuuids;
to your Models.
Example:
Laravel version
Current package version works for Laravel 5.3+ 6.x 7.x 8.x 9.x 10.x
All versions of pkuuids with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4.0
laravel/framework Version 5.x | 6.* | 7.* | 8.* | 9.* | 10.*
ramsey/uuid Version 3.x | 4.* | 5.*
laravel/framework Version 5.x | 6.* | 7.* | 8.* | 9.* | 10.*
ramsey/uuid Version 3.x | 4.* | 5.*
The package adamlien/pkuuids contains the following files
Loading the files please wait ....