hasOne(ProjectFlow::class, 'id', 'flow_id'); } /** * @return bool|null */ public function deleteFlowItem() { ProjectTask::whereFlowItemId($this->id)->update([ 'flow_item_id' => 0, 'flow_item_name' => "", ]); return $this->delete(); } }