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