id) ->where('company_id', $task_status->company_id) ->update(['status_id' => null]); parent::delete($task_status); return $task_status; } public function archive($task_status) { Task::where('status_id', $task_status->id) ->where('company_id', $task_status->company_id) ->update(['status_id' => null]); parent::archive($task_status); return $task_status; } }