| 1234567891011121314151617181920212223 |
- <?php
- namespace App\Services;
- use Illuminate\Support\Facades\DB;
- class RechargeIpWhite
- {
- // 验证支付IP白名单
- public function verify($ip)
- {
- $first = DB::connection('write')->table('agent.dbo.recharge_ip')
- ->whereRaw("CHARINDEX($ip, ip) > 0")
- ->first();
- if (!$first) {
- return false;
- }
- return true;
- }
- }
|