<?php

namespace App\General;

use App\Models\Adminsettings;

class SettingsClass
{
    public static function getOptionValue($key, $items)
    {
        foreach ($items as $item) {
            if ($item->key === $key) {
                return $item->value;
            }
        }
        return '';
    }

    public static function getRequiredValue($key){
        $settings = Adminsettings::get();
        foreach($settings as $setting){
            if($setting->key == $key){
                return $setting->value;
            }
        }
        return '';
    }
}
