/var/www/cobraambalaj/vendor/laravel/framework/src/Illuminate/Database/Eloquent
NameSizeModeActions
Casts/-0755rm
Concerns/-0755rm
Factories/-0755rm
Relations/-0755rm
Builder.php452610755editdlrm
Collection.php186710755editdlrm
HigherOrderBuilderProxy.php10690644editdlrm
InvalidCastException.php9320644editdlrm
JsonEncodingException.php13890644editdlrm
MassAssignmentException.php1370755editdlrm
Model.php500330644editdlrm
ModelNotFoundException.php12600755editdlrm
QueueEntityResolver.php6770644editdlrm
RelationNotFoundException.php7930755editdlrm
Scope.php3500644editdlrm
SoftDeletes.php51720644editdlrm
SoftDeletingScope.php36250644editdlrm
Edit: /var/www/cobraambalaj/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php (5172B)
casts[$this->getDeletedAtColumn()])) { $this->casts[$this->getDeletedAtColumn()] = 'datetime'; } } /** * Force a hard delete on a soft deleted model. * * @return bool|null */ public function forceDelete() { $this->forceDeleting = true; return tap($this->delete(), function ($deleted) { $this->forceDeleting = false; if ($deleted) { $this->fireModelEvent('forceDeleted', false); } }); } /** * Perform the actual delete query on this model instance. * * @return mixed */ protected function performDeleteOnModel() { if ($this->forceDeleting) { $this->exists = false; return $this->setKeysForSaveQuery($this->newModelQuery())->forceDelete(); } return $this->runSoftDelete(); } /** * Perform the actual delete query on this model instance. * * @return void */ protected function runSoftDelete() { $query = $this->setKeysForSaveQuery($this->newModelQuery()); $time = $this->freshTimestamp(); $columns = [$this->getDeletedAtColumn() => $this->fromDateTime($time)]; $this->{$this->getDeletedAtColumn()} = $time; if ($this->timestamps && ! is_null($this->getUpdatedAtColumn())) { $this->{$this->getUpdatedAtColumn()} = $time; $columns[$this->getUpdatedAtColumn()] = $this->fromDateTime($time); } $query->update($columns); $this->syncOriginalAttributes(array_keys($columns)); } /** * Restore a soft-deleted model instance. * * @return bool|null */ public function restore() { // If the restoring event does not return false, we will proceed with this // restore operation. Otherwise, we bail out so the developer will stop // the restore totally. We will clear the deleted timestamp and save. if ($this->fireModelEvent('restoring') === false) { return false; } $this->{$this->getDeletedAtColumn()} = null; // Once we have saved the model, we will fire the "restored" event so this // developer will do anything they need to after a restore operation is // totally finished. Then we will return the result of the save call. $this->exists = true; $result = $this->save(); $this->fireModelEvent('restored', false); return $result; } /** * Determine if the model instance has been soft-deleted. * * @return bool */ public function trashed() { return ! is_null($this->{$this->getDeletedAtColumn()}); } /** * Register a "restoring" model event callback with the dispatcher. * * @param \Closure|string $callback * @return void */ public static function restoring($callback) { static::registerModelEvent('restoring', $callback); } /** * Register a "restored" model event callback with the dispatcher. * * @param \Closure|string $callback * @return void */ public static function restored($callback) { static::registerModelEvent('restored', $callback); } /** * Register a "forceDeleted" model event callback with the dispatcher. * * @param \Closure|string $callback * @return void */ public static function forceDeleted($callback) { static::registerModelEvent('forceDeleted', $callback); } /** * Determine if the model is currently force deleting. * * @return bool */ public function isForceDeleting() { return $this->forceDeleting; } /** * Get the name of the "deleted at" column. * * @return string */ public function getDeletedAtColumn() { return defined('static::DELETED_AT') ? static::DELETED_AT : 'deleted_at'; } /** * Get the fully qualified "deleted at" column. * * @return string */ public function getQualifiedDeletedAtColumn() { return $this->qualifyColumn($this->getDeletedAtColumn()); } }