<?php

namespace App\General;

use App\Models\UserMeta;

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

    public static function getRequiredValue($option){
        $user_metas = UserMeta::get();
        foreach($user_metas as $user_meta){
            if($user_meta->option == $option){
                return $user_meta->value;
            }
        }
        return '';
    }
}
