From b5a7457f25b7760a4906aff30ad16f39da9f5295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Thu, 21 Jan 2021 14:37:10 +0300 Subject: [PATCH] fixed tenancy issue --- app/Models/Banking/Transaction.php | 2 ++ app/Models/Common/Contact.php | 2 ++ app/Models/Document/Document.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/app/Models/Banking/Transaction.php b/app/Models/Banking/Transaction.php index d57ec6575..5a893806a 100644 --- a/app/Models/Banking/Transaction.php +++ b/app/Models/Banking/Transaction.php @@ -60,6 +60,8 @@ class Transaction extends Model */ protected static function booted() { + parent::booted(); + static::addGlobalScope(new Scope); } diff --git a/app/Models/Common/Contact.php b/app/Models/Common/Contact.php index 3a207be7b..086dc4c46 100644 --- a/app/Models/Common/Contact.php +++ b/app/Models/Common/Contact.php @@ -49,6 +49,8 @@ class Contact extends Model */ protected static function booted() { + parent::booted(); + static::addGlobalScope(new Scope); } diff --git a/app/Models/Document/Document.php b/app/Models/Document/Document.php index 56416db6a..e371395ce 100644 --- a/app/Models/Document/Document.php +++ b/app/Models/Document/Document.php @@ -79,6 +79,8 @@ class Document extends Model */ protected static function booted() { + parent::booted(); + static::addGlobalScope(new Scope); }