Skip to content

Commit

Permalink
Merge pull request #12 from strorch/fix-manual-add-disabling
Browse files Browse the repository at this point in the history
fix disabling for ad created by manual way
  • Loading branch information
tushargugnani authored Dec 31, 2023
2 parents 0ab2cc5 + b2d1036 commit d3c66a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Components/SmartAdComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct($slug)
*/
public function render()
{
$smartAd = SmartAd::where('slug', $this->slug)->first();
$smartAd = SmartAd::where('slug', $this->slug)->where('enabled', true)->first();
return view('smart-ads::components.smart-ad-component', compact('smartAd'));
}
}

0 comments on commit d3c66a9

Please sign in to comment.