From 70835d92ad934ebd4448f459e7d6f50fcf645500 Mon Sep 17 00:00:00 2001 From: Thomas Zilio Date: Fri, 16 Nov 2018 16:14:46 +0100 Subject: [PATCH] Fix malfunzionamento righe --- include/src/Description.php | 4 ++++ include/src/Row.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/src/Description.php b/include/src/Description.php index 3b83711a0..501b16478 100644 --- a/include/src/Description.php +++ b/include/src/Description.php @@ -14,6 +14,10 @@ abstract class Description extends Model static::addGlobalScope('descriptions', function (Builder $builder) { $builder->where('is_descrizione', '=', 1); }); + } else { + static::addGlobalScope('not_descriptions', function (Builder $builder) { + $builder->where('is_descrizione', '=', 0); + }); } } diff --git a/include/src/Row.php b/include/src/Row.php index bf628256d..4b176905e 100644 --- a/include/src/Row.php +++ b/include/src/Row.php @@ -10,7 +10,7 @@ abstract class Row extends Description protected static function boot($bypass = false) { - parent::boot($bypass); + parent::boot(true); if (!$bypass) { static::addGlobalScope('rows', function (Builder $builder) {