1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 20:34:03 +00:00

misc improvements - stronger types, exception refactor

This commit is contained in:
Samuel Štancl 2022-08-26 21:35:17 +02:00
parent ddc7cf49c3
commit 55d0a9ab87
34 changed files with 179 additions and 209 deletions

View file

@ -35,10 +35,8 @@ class ImpersonationToken extends Model
'created_at',
];
public static function boot()
public static function booted()
{
parent::boot();
static::creating(function ($model) {
$model->created_at = $model->created_at ?? $model->freshTimestamp();
$model->token = $model->token ?? Str::random(128);