24 lines
387 B
PHP
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;
|
|
}
|
|
}
|
|
|
|
}
|