public static function boot() { parent::boot(); static::creating(function ($model) { $model->beforeCreate(); }); }
public static function boot() { parent::boot(); static::saving(function ($instance) { $instance->beforeSave(); }); }
public static function boot() { parent::boot(); static::creating(function ($instance) { $instance->beforeCreate(); }); static::created(function ($instance) { $instance->afterCreate(); }); }