encode($mt); } /** * Register callbacks */ protected static function bootHashId() { static::creating(function ($model) { if (empty($model->id)) { $model->id = static::createNewHashId(); } }); } }