Skip to content

Commit

Permalink
Template store id check (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobWez98 authored Jan 21, 2025
1 parent 6f15530 commit ee6b4bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Models/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Rapidez\Core\Models\Category;
use Rapidez\Core\Models\Model;
use Rapidez\Core\Models\Product;
use Rapidez\Core\Models\Scopes\ForCurrentStoreWithoutLimitScope;
use Rapidez\Core\Models\Scopes\IsActiveScope;

class Template extends Model
Expand All @@ -15,6 +16,7 @@ class Template extends Model
protected static function booted()
{
static::addGlobalScope(new IsActiveScope());
static::addGlobalScope(new ForCurrentStoreWithoutLimitScope('template_id', 'store_ids'));
}

public static function content(Model $model, string $field)
Expand Down

0 comments on commit ee6b4bd

Please sign in to comment.