Critics have remarked that those four worthies were truly peerless throughout the ages; yet the present falls short of the pastβ€”the ancients favored unadorned simplicity, whereas the moderns prefer refined elegance. Styles of substance and ornament rise and fall in succession, shifting with the changing mores of the times; such evolution is simply the natural order of things. The ideal lies in honoring antiquity without clashing with the present, and embracing modernity without succumbing to its flawsβ€”embodying that perfect balance of substance and refinement that defines the true gentleman. There is surely no need to abandon a carved palace in favor of a cave dwelling, or to trade a jade carriage for a primitive cart with solid wooden wheels.🌌 SpectraShell

🌌 SpectraShell

Current path: home/u461622454/domains/wordfairy.ai/public_html/app/Models/



βœ… Cloned to:


⬆️ Go up: /home/u461622454/domains/wordfairy.ai/public_html/app

πŸ“„ Viewing: Subscriber.php

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;

class Subscriber extends Model
{
    use HasFactory;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'user_id',
        'plan_id',
        'status',
        'gateway',
        'words',
        'images',
        'characters',
        'minutes',
        'subscription_id',
        'active_until',
        'frequency',
        'paddle_cancel_url',
        'model',
        'max_tokens',
        'paystack_customer_code',
        'paystack_authorization_code',
        'paystack_email_token',
    ];


    /**
     * Subscription belongs to a single user
     *
     * 
     */
    public function user()
    {
        return $this->belongsTo(User::class);
    }


    /**
     * Plan belongs to a single user
     *
     * 
     */
    public function plan()
    {
        return $this->belongsTo(SubscriptionPlan::class);
    }


    /**
     * Check if subscription is active
     *
     * 
     */
    public function isActive($id)
    {
        $subscription = Subscriber::where('status', 'Active')->where('user_id', $id)->first();
        \Log::info($subscription);
        if ($subscription) {
            return Carbon::parse($this->active_until)->isPast();
        } 
    }
}


πŸ“

Page Not Found

404

Ooops! Looks like it is not here

Keep searching and you will find it one day, we all do!

Back to Main Page