Skip to content

Commit

Permalink
Moved with to variable
Browse files Browse the repository at this point in the history
  • Loading branch information
BobWez98 committed May 22, 2024
1 parent dd761c5 commit 5b71ff7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Models/ProductImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class ProductImage extends Model

protected $primaryKey = 'value_id';

protected $with = ['productImageValue'];

protected static function booted(): void
{
static::addGlobalScope(
Expand All @@ -20,7 +22,7 @@ protected static function booted(): void
'productImageValue',
fn ($query) => $query
->where($query->qualifyColumn('disabled'), 0)
)->with('productImageValue')
)
);
}

Expand Down

0 comments on commit 5b71ff7

Please sign in to comment.