xzxzyzyz/laravel-uuid-model
Laravel Uuid Model
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
{
//...
}
Related Packages
mindtwo/laravel-auto-create-uuid
Automatically generate UUIDs for Eloquent models on creation and replication.
28,926
1
dev-toolbelt/laravel-eloquent-plus
Supercharge your Laravel Eloquent models with automatic validation, audit trails...
1,803
2
dyrynda/laravel-model-uuid
This package allows you to easily work with UUIDs in your Laravel models.
3,363,006
484
stevenmaguire/laravel-uuid-model
Create non-incrementing Laravel models whose primary key is a UUID
46
4
czim/laravel-listify
Turns any model into a list. Rebuild of the popular Lookitsatravis Listify packa...
81,491
5
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v1.9.0 | ^8.2 | ^10.0| | MIT | |
| v1.8.0 | ^8.1 | ^9.0| | MIT | |
| v1.7.0 | ^8.1 | ^9.0| | MIT | |
| v1.6.0 | ^7.4| | ^8.0| | MIT | |
| v1.5.0 | ^7.4| | ^7.0| | MIT | |
| v1.4.1 | ^7.3| | ^6.0| | MIT | |
| v1.4.0 | ^7.3 | ^5.8| | MIT | |
| v1.3.0 | ^7.2 | ^5.8| | MIT | |
| v1.2.0 | ^7.1.3 | ^5.5| | MIT | |
| v1.1.1 | ^7.1.3 | ~5.6.0| | MIT | |
| v1.1.0 | ^7.1.3 | ~5.6.0| | MIT | |
| v1.0 | ^7.1.3 | ~5.6.0| | MIT |