Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Titoratus/9e93e6809a6a82c08c4015fee23ebf2f to your computer and use it in GitHub Desktop.
Save Titoratus/9e93e6809a6a82c08c4015fee23ebf2f to your computer and use it in GitHub Desktop.
[OctoberCMS] Значение purged поля ПОСЛЕ создания модели
class MyModel extends Model
{
...
public function afterCreate()
{
// вот значение purged поля _extras
// подчкёркивание (_) означает, что это поле (которое в форме) не будет сохраняться в данной модели MyModel.
// но я хочу получить его для сохранения в другую модель.
$val = $this->getOriginalPurgeValue('_extras');
}
protected $purgeable = ['_extras'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment