Skip to content

Commit

Permalink
🐛 Fix load features plan
Browse files Browse the repository at this point in the history
  • Loading branch information
juzaweb committed Apr 18, 2024
1 parent 9fab1bd commit e698a35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Models/ModuleSubscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ public function paymentHistories(): HasMany

public function scopeInEffect(Builder $query): Builder
{
return $query->isActive()->where('end_date', '>=', now());
return $query->isActive()
->whereDate('end_date', '>=', now());
}

public function scopeIsActive(Builder $query): Builder
Expand Down
3 changes: 3 additions & 0 deletions src/Models/PlanFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Support\Carbon;
use Juzaweb\CMS\Models\Model;
use Juzaweb\CMS\Traits\QueryCache\QueryCacheable;

/**
* Juzaweb\Subscription\Models\PlanFeature
Expand Down Expand Up @@ -43,6 +44,8 @@
*/
class PlanFeature extends Model
{
use QueryCacheable;

protected $table = 'subscription_plan_features';

protected $fillable = [
Expand Down

0 comments on commit e698a35

Please sign in to comment.