orderId = $orderId; $this->referenceId = $referenceId; } /** * @return string */ public function getOrderId(): string { return $this->orderId; } /** * @return string */ public function getReferenceId(): string { return $this->referenceId; } /** * @return bool */ public function completeStep(): bool { $orderStep = OrderStep::where('order_id', $this->getOrderId()) ->where('reference_id', $this->getReferenceId())->firstOrFail(); $orderStep->complete = 1; if($orderStep->save()){ return true; } return false; } }