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 48c7128 commit ff994bcCopy full SHA for ff994bc
src/Models/BaseModel.php
@@ -58,15 +58,15 @@ abstract class BaseModel extends Model
58
*/
59
public function __construct(array $attributes = [])
60
{
61
+ if ($this->incrementing) {
62
+ $this->casts[$this->getKeyName()] ??= $this->getKeyType();
63
+ }
64
+
65
parent::__construct($attributes);
66
67
$this->initializeActiveRecordSegregationProperties();
68
69
$this->appends[] = 'primary_key_identifier';
-
- if ($this->incrementing) {
- $this->casts[$this->getKeyName()] ??= $this->getKeyType();
- }
70
}
71
72
public static function resourceName(): string
0 commit comments