config service for show liman price

This commit is contained in:
2026-05-24 19:22:09 +03:30
parent d684290848
commit 81d4aa8926
3 changed files with 30 additions and 22 deletions
+7 -7
View File
@@ -2,17 +2,17 @@
namespace App\Services;
use Illuminate\Support\Facades\Http;
use League\Flysystem\Config;
use App\Models\Setting;
class ConfigService
{
public static function Config($name)
public function Config($name)
{
return Setting::where('key',$name)->first()->value ?? false;
return Setting::where('key', $name)->value('value') ?? false;
}
public static function UpdateConfig($name,$value)
public function UpdateConfig($name, $value)
{
return Setting::where('key',$name)->update(['value'=>$value]);
return Setting::where('key', $name)->update(['value' => $value]);
}
}
}