| Package Data | |
|---|---|
| Maintainer Username: | ryanwinchester |
| Maintainer Contact: | fungku@gmail.com (Ryan Winchester) |
| Package Create Date: | 2016-10-07 |
| Package Last Update: | 2016-10-07 |
| Language: | PHP |
| License: | Apache-2.0 |
| Last Refreshed: | 2025-10-30 03:12:17 |
| Package Statistics | |
|---|---|
| Total Downloads: | 17 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 1 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
To use it just install
composer require sevenshores/eloquent-uuids
then in you model you can do:
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use SevenShores\Uuids\Uuids;
class Post extends Model
{
use Uuids;
public $incrementing = false;
// . . .
}
Don't forget, in your migration for your model, for id field you should use:
$table->uuid('id')->primary();
I know I've seen a similar package to this in the past, but I don't remember where, and don't care to look for it, because I'd rather just make my own for my own use.