🚀 Hostinger Optimized
🖥️ Server: LiteSpeed
💻 System: Linux s20058.bom1.stableserver.net 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
👤 User: skhata (1324)
🐘 PHP: 8.4.20
🚫 Disabled: ✨ NONE

💻 Terminal

📁 /home/skhata/chandrasons.com/public
$

📄 Setting.php

📁 Path: //home7/skhata/chandrasons.com/app/Models/Setting.php
📊 Size: 581 B
🔒 Perm: 0644
📝 MIME: text/x-php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;

class Setting extends Model {
    protected $fillable = ['key', 'value', 'group'];
    public static function get(string $key, $default = null) {
        return cache()->remember("setting_{$key}", 3600, function () use ($key, $default) {
            return static::where('key', $key)->value('value') ?? $default;
        });
    }
    public static function set(string $key, $value): void {
        static::updateOrCreate(['key' => $key], ['value' => $value]);
        cache()->forget("setting_{$key}");
    }
}
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨