diff --git a/app/Observers/ClientObserver.php b/app/Observers/ClientObserver.php index 6a46c9347f..61e2494f7b 100644 --- a/app/Observers/ClientObserver.php +++ b/app/Observers/ClientObserver.php @@ -25,7 +25,7 @@ class ClientObserver */ public function created(Client $client) { - WebhookHandler::dispatch(Webhook::EVENT_CREATE_CLIENT, $client); + WebhookHandler::dispatch(Webhook::EVENT_CREATE_CLIENT, $client, $client->company); } /** @@ -36,7 +36,7 @@ class ClientObserver */ public function updated(Client $client) { - WebhookHandler::dispatch(Webhook::EVENT_UPDATE_CLIENT, $client); + WebhookHandler::dispatch(Webhook::EVENT_UPDATE_CLIENT, $client, $client->company); } /** @@ -47,7 +47,7 @@ class ClientObserver */ public function deleted(Client $client) { - WebhookHandler::dispatch(Webhook::EVENT_DELETE_CLIENT, $client); + WebhookHandler::dispatch(Webhook::EVENT_DELETE_CLIENT, $client, $client->company); } /** diff --git a/app/Observers/ExpenseObserver.php b/app/Observers/ExpenseObserver.php index 9c3b6b32c8..f1f3a80c67 100644 --- a/app/Observers/ExpenseObserver.php +++ b/app/Observers/ExpenseObserver.php @@ -25,7 +25,7 @@ class ExpenseObserver */ public function created(Expense $expense) { - WebhookHandler::dispatch(Webhook::EVENT_CREATE_EXPENSE, $expense); + WebhookHandler::dispatch(Webhook::EVENT_CREATE_EXPENSE, $expense, $expense->company); } /** @@ -36,7 +36,7 @@ class ExpenseObserver */ public function updated(Expense $expense) { - WebhookHandler::dispatch(Webhook::EVENT_UPDATE_EXPENSE, $expense); + WebhookHandler::dispatch(Webhook::EVENT_UPDATE_EXPENSE, $expense, $expense->company); } /** @@ -47,7 +47,7 @@ class ExpenseObserver */ public function deleted(Expense $expense) { - WebhookHandler::dispatch(Webhook::EVENT_DELETE_EXPENSE, $expense); + WebhookHandler::dispatch(Webhook::EVENT_DELETE_EXPENSE, $expense, $expense->company); } /** diff --git a/app/Observers/InvoiceObserver.php b/app/Observers/InvoiceObserver.php index e777b807b5..16a735f7d7 100644 --- a/app/Observers/InvoiceObserver.php +++ b/app/Observers/InvoiceObserver.php @@ -26,7 +26,7 @@ class InvoiceObserver */ public function created(Invoice $invoice) { - WebhookHandler::dispatch(Webhook::EVENT_CREATE_INVOICE, $invoice); + WebhookHandler::dispatch(Webhook::EVENT_CREATE_INVOICE, $invoice, $invoice->expense); } /** @@ -37,7 +37,7 @@ class InvoiceObserver */ public function updated(Invoice $invoice) { - WebhookHandler::dispatch(Webhook::EVENT_UPDATE_INVOICE, $invoice); + WebhookHandler::dispatch(Webhook::EVENT_UPDATE_INVOICE, $invoice, $invoice->company); } /** @@ -48,7 +48,7 @@ class InvoiceObserver */ public function deleted(Invoice $invoice) { - WebhookHandler::dispatch(Webhook::EVENT_DELETE_INVOICE, $invoice); + WebhookHandler::dispatch(Webhook::EVENT_DELETE_INVOICE, $invoice, $invoice->company); } /** diff --git a/app/Observers/PaymentObserver.php b/app/Observers/PaymentObserver.php index c425ef1c1e..0706c56009 100644 --- a/app/Observers/PaymentObserver.php +++ b/app/Observers/PaymentObserver.php @@ -26,7 +26,7 @@ class PaymentObserver */ public function created(Payment $payment) { - WebhookHandler::dispatch(Webhook::EVENT_CREATE_PAYMENT, $payment); + WebhookHandler::dispatch(Webhook::EVENT_CREATE_PAYMENT, $payment, $payment->company); } /** @@ -47,7 +47,7 @@ class PaymentObserver */ public function deleted(Payment $payment) { - WebhookHandler::dispatch(Webhook::EVENT_DELETE_PAYMENT, $payment); + WebhookHandler::dispatch(Webhook::EVENT_DELETE_PAYMENT, $payment, $payment->company); } /** diff --git a/app/Observers/QuoteObserver.php b/app/Observers/QuoteObserver.php index 3dc3281159..0c69048d7b 100644 --- a/app/Observers/QuoteObserver.php +++ b/app/Observers/QuoteObserver.php @@ -25,7 +25,7 @@ class QuoteObserver */ public function created(Quote $quote) { - WebhookHandler::dispatch(Webhook::EVENT_CREATE_QUOTE, $quote); + WebhookHandler::dispatch(Webhook::EVENT_CREATE_QUOTE, $quote, $quote->company); } /** @@ -36,7 +36,7 @@ class QuoteObserver */ public function updated(Quote $quote) { - WebhookHandler::dispatch(Webhook::EVENT_UPDATE_QUOTE, $quote); + WebhookHandler::dispatch(Webhook::EVENT_UPDATE_QUOTE, $quote, $quote->company); } /** @@ -47,7 +47,7 @@ class QuoteObserver */ public function deleted(Quote $quote) { - WebhookHandler::dispatch(Webhook::EVENT_DELETE_QUOTE, $quote); + WebhookHandler::dispatch(Webhook::EVENT_DELETE_QUOTE, $quote, $quote->company); } /** diff --git a/app/Observers/TaskObserver.php b/app/Observers/TaskObserver.php index 25ebb1ea0b..9bbfc38d6b 100644 --- a/app/Observers/TaskObserver.php +++ b/app/Observers/TaskObserver.php @@ -25,7 +25,7 @@ class TaskObserver */ public function created(Task $task) { - WebhookHandler::dispatch(Webhook::EVENT_CREATE_TASK, $task); + WebhookHandler::dispatch(Webhook::EVENT_CREATE_TASK, $task, $task->company); } /** @@ -36,7 +36,7 @@ class TaskObserver */ public function updated(Task $task) { - WebhookHandler::dispatch(Webhook::EVENT_UPDATE_TASK, $task); + WebhookHandler::dispatch(Webhook::EVENT_UPDATE_TASK, $task, $task->company); } /** @@ -47,7 +47,7 @@ class TaskObserver */ public function deleted(Task $task) { - WebhookHandler::dispatch(Webhook::EVENT_DELETE_TASK, $task); + WebhookHandler::dispatch(Webhook::EVENT_DELETE_TASK, $task, $task->company); } /**