Download the PHP package haymetg/luuid without Composer
On this page you can find all versions of the php package haymetg/luuid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download haymetg/luuid
More information about haymetg/luuid
Files in haymetg/luuid
Download haymetg/luuid
More information about haymetg/luuid
Files in haymetg/luuid
Vendor haymetg
Package luuid
Short Description A Laravel package for making UUID primary key
License MIT
Package luuid
Short Description A Laravel package for making UUID primary key
License MIT
Please rate this library. Is it a good library?
Informations about the package luuid
LUUID (Liam-senpai UUID)
A Laravel package for creating uuid primary keys.
How to use?
1) Install composer require haymetg/luuid
2) use luuid()
in migration,
Example:
Schema::create('posts', function (Blueprint $table) {
$table->luuid(); // you can also custom your luuid `luuid('post_id')`
$table->string('title');
$table->string('body');
$table->timestamps();
});
3) use WithUuid
trait in your Model and declare the primary key
Example:
namespace App;
use HaymeTG\LUUID\Traits\WithUuid;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
use WithUuid;
protected $primaryKey = 'uuid';
}
Done! This will automatically generate unique UUID whenever you save a new record.
Credits:
Liam-senpai https://github.com/liamdemafelix
All versions of luuid with dependencies
PHP Build Version
Package Version
No informations.
The package haymetg/luuid contains the following files
Loading the files please wait ....