Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/ObjectUpdateCommand.php
- This file was copied to src/app/Console/ObjectDeleteCommand.php.
Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | public function handle() | ||||
$value = null; | $value = null; | ||||
} | } | ||||
$object->{$property} = $value; | $object->{$property} = $value; | ||||
} | } | ||||
$object->timestamps = false; | $object->timestamps = false; | ||||
$object->save(['timestamps' => false]); | if ($this->commandPrefix == 'scalpel') { | ||||
$this->objectClass::withoutEvents( | |||||
function () use ($object) { | |||||
$object->save(); | |||||
} | |||||
); | |||||
} else { | |||||
$object->save(); | |||||
} | |||||
$this->cacheRefresh($object); | $this->cacheRefresh($object); | ||||
} | } | ||||
} | } |