public static function boot() { parent::boot(); self::creating(function ($model) { // ... code here }); self::created(function ($model) { // USER00001 $model->special_identifier = 'USER' . str_pad($model->id, 5, '0', STR_PAD_LEFT); $model->save(); // You need to save again since this happens after creation }); self::updating(function ($model) { // ... code here }); self::updated(function ($model) { // ... code here }); self::deleting(function ($model) { // ... code here }); self::deleted(function ($model) { // ... code here }); }