find($id); } // 견적 생성 public function createEstimate($mainRequestId, array $data) { $data['main_request_id'] = $mainRequestId; return MainRequestEstimate::create($data); } // 주문 생성 public function createOrder($mainRequestId, array $data) { $data['main_request_id'] = $mainRequestId; return MainRequestOrder::create($data); } // 이력(Flow) 기록 public function addFlow($mainRequestId, $flowableType, $flowableId, $status, $action, $actorId, $content = null) { return MainRequestFlow::create([ 'main_request_id' => $mainRequestId, 'flowable_type' => $flowableType, 'flowable_id' => $flowableId, 'status_code' => $status, 'action' => $action, 'actor_id' => $actorId, 'content' => $content, ]); } }