password)) { $model->password = Hash::make($model->password); } $model->remember_token = Str::random(10); }); static::updating(function (self $model) { if (Hash::needsRehash($model->password)) { $model->password = Hash::make($model->password); } $model->remember_token = Str::random(10); }); } }