Fix malfunzionamento righe

This commit is contained in:
Thomas Zilio 2018-11-16 16:14:46 +01:00
parent 224a4e9561
commit 70835d92ad
2 changed files with 5 additions and 1 deletions

View File

@ -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);
});
}
}

View File

@ -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) {