We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e491640 commit b21c790Copy full SHA for b21c790
README.md
@@ -48,7 +48,7 @@ class TestModel extends Model
48
}
49
```
50
51
-If don't like the primary key named `uuid` you can manually specify `$primaryKey`. Don't forget set `$incrementing` to false.
+If don't like the primary key named `uuid` you can manually specify the `getKeyName` method. Don't forget set `$incrementing` to false.
52
53
```php
54
use Illuminate\Database\Eloquent\Model;
@@ -60,7 +60,10 @@ class TestModel extends Model
60
61
public $incrementing = false;
62
63
- public $primaryKey = 'uuid';
+ public function getKeyName()
64
+ {
65
+ return 'custom_uuid';
66
+ }
67
68
69
0 commit comments