encode($mt); } /** * Register callbacks * * @throws \Hashids\HashidsException */ final protected static function bootHashIdTrait(): void { static::creating(function ($model) { if (empty($model->id)) { $model->id = static::createNewHashId(); } }); } }