client = $client; $this->quote = $quote; } public function run() { /* Return immediately if status is not draft */ if ($this->quote->status_id != Quote::STATUS_DRAFT) { return $this->quote; } $this->quote->markInvitationsSent(); event(new QuoteWasMarkedSent($this->quote, $this->quote->company)); $this->quote ->service() ->setStatus(Quote::STATUS_SENT) ->applyNumber() ->save(); return $this->quote; } }