You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://packagist.org/packages/spatie/laravel-binary-uuid)
[](https://packagist.org/packages/boxed-code/laravel-binary-uuid)
*Forked from the [archived package](https://github.com/spatie/laravel-binary-uuid) at spaite, maintenance releases only.*
13
8
14
9
Using a regular uuid as a primary key is guaranteed to be slow.
15
10
@@ -26,7 +21,7 @@ The package currently only supports MySQL and SQLite.
26
21
You can install the package via Composer:
27
22
28
23
```bash
29
-
composer require spatie/laravel-binary-uuid
24
+
composer require boxed-code/laravel-binary-uuid
30
25
```
31
26
32
27
## Usage
@@ -40,11 +35,11 @@ Schema::create('table_name', function (Blueprint $table) {
40
35
});
41
36
```
42
37
43
-
To get your model to work with the encoded UUID (i.e. to use uuid as a primary key), you must let your model use the `Spatie\BinaryUuid\HasBinaryUuid` trait.
38
+
To get your model to work with the encoded UUID (i.e. to use uuid as a primary key), you must let your model use the `BoxedCode\BinaryUuid\HasBinaryUuid` trait.
44
39
45
40
```php
46
41
use Illuminate\Database\Eloquent\Model;
47
-
use Spatie\BinaryUuid\HasBinaryUuid;
42
+
use BoxedCode\BinaryUuid\HasBinaryUuid;
48
43
49
44
class TestModel extends Model
50
45
{
@@ -56,7 +51,7 @@ If don't like the primary key named `uuid` you can manually specify the `getKeyN
56
51
57
52
```php
58
53
use Illuminate\Database\Eloquent\Model;
59
-
use Spatie\BinaryUuid\HasBinaryUuid;
54
+
use BoxedCode\BinaryUuid\HasBinaryUuid;
60
55
61
56
class TestModel extends Model
62
57
{
@@ -75,7 +70,7 @@ If you try converting your model to JSON with binary attributes, you will see er
0 commit comments