/** * This will override the given model which means it will be deleted * from database... * * @param Model $model */ public function override(Model $model) { if ($model->doesUse('Ordered')) { // Set the order to the same model order $this->setOrder($model->getOrder()); $model->delete(); } }