Skip to content
المشاريع

حول

حزمة Laravel لإنشاء UUID والتحقق من صحتها وفق معيار RFC 4122. يتضمن الدعم المدمج إصدارات UUID ‏1 و3 و4 و5 فقط.

تطوير الويب والتطبيقات

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
؜-١
خلال 15 يومًا
؜-٢
خلال شهر
؜-٢

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

Laravel UUID Integration

Total Downloads PHP Version Laravel Version License

Laravel package for generating and working with UUIDs. Automatic UUID model keys, validation rules, and Eloquent support.

Installation

composer require webpatser/laravel-uuid

Requirements: PHP 8.6+, Laravel 13.x, webpatser/uuid 4.x (installed automatically; this is the 9.x line)

PHP version policy

This package supports only the latest stable PHP release. When a new PHP version is released, the next release of this package requires it and support for the previous PHP version ends. Currently: PHP 8.6.

Quick Start

use Illuminate\Support\Str;
use Webpatser\LaravelUuid\HasUuids;

// High-performance UUID generation
$uuid = Str::fastUuid();                // 15% faster than Str::uuid()
$ordered = Str::fastOrderedUuid();      // Database-optimized
$v6 = Str::reorderedTimeUuid();         // V6, time-ordered per RFC 9562

// Eloquent model integration
class User extends Model 
{
    use HasUuids; // Automatic UUID generation
}

Upgrading

From 8.x to 9.0

Version 9.0 requires webpatser/uuid 4.x; run composer require webpatser/laravel-uuid:^9.0.

  • Str::reorderedTimeUuid() and Str::binaryReorderedTimeUuid() now return RFC 9562 V6 values, which sort by creation time. Newly generated values differ from those generated by 8.x or earlier, which used the V1 field order.
  • Reading the time of a V6 value generated by 8.x or earlier (Str::uuidTimestamp(), getUuidTimestamp() in HasUuids and HasBinaryUuids) no longer returns its creation time and is not meaningful.
  • Stored V6 values stay valid and unique, but they were never time-ordered. Nothing needs migrating; only code that relies on the time of old V6 values is affected.

Documentation

For complete documentation, examples, and API reference, visit:

https://documentation.downsized.nl/laravel-uuid

License

MIT License.

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…