Files
water-back/modules/Withdraw/Models/Config.php
2023-01-12 14:47:38 +08:00

24 lines
387 B
PHP

<?php
namespace Modules\Withdraw\Models;
use App\Models\Model;
class Config extends Model
{
protected $table = 'withdraw_configs';
public static function getValue($slug, $default = 0)
{
$info = Config::query()->where('slug', $slug)->first();
if ($info) {
return $info->value;
} else {
return $default;
}
}
}