uawdijnntqw1x1x1
IP : 216.73.216.93
Hostname : panel.codeskitter.com
Kernel : Linux panel.codeskitter.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
Disable Function : apache_child_terminate, apache_note, apache_setenv, define_syslog_variables, dl, link, opcache_get_status, openlog, pcntl_exec, pcntl_fork, pcntl_setpriority, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid
OS : Linux
PATH:
/
home
/
users
/
unlimited
/
www
/
admin.brosiper.codeskitter.site
/
app
/
Models
/
AddOn.php
/
/
<?php namespace App\Models; use App\Scopes\StoreScope; use App\Scopes\ZoneScope; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\MorphMany; use Illuminate\Support\Carbon; /** * Class AddOn * * @property int $id * @property string $name * @property float $price * @property Carbon|null $created_at * @property Carbon|null $updated_at * @property int $store_id * @property bool $status */ class AddOn extends Model { /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'name', 'price', 'store_id', 'status', ]; /** * @var string[] */ protected $casts = [ 'price' => 'float', 'store_id' => 'integer', 'status' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime' ]; /** * @return MorphMany */ public function translations(): MorphMany { return $this->morphMany(Translation::class, 'translationable'); } /** * @param $value * @return mixed */ public function getNameAttribute($value){ if (count($this->translations) > 0) { foreach ($this->translations as $translation) { if ($translation['key'] == 'name') { return $translation['value']; } } } return $value; } /** * @param $query * @return mixed */ public function scopeActive($query): mixed { return $query->where('status', 1); } /** * @return BelongsTo */ public function store(): BelongsTo { return $this->belongsTo(Store::class); } /** * @return void */ protected static function booted(): void { if(auth('vendor')->check() || auth('vendor_employee')->check()) { static::addGlobalScope(new StoreScope); } static::addGlobalScope(new ZoneScope); static::addGlobalScope('translate', function (Builder $builder) { $builder->with(['translations' => function($query){ return $query->where('locale', app()->getLocale()); }]); }); } }
/home/users/unlimited/www/admin.brosiper.codeskitter.site/app/Models/AddOn.php