Page MenuHomePhorge

IP6Net.php
No OneTemporary

Authored By
Unknown
Size
667 B
Referenced Files
None
Subscribers
None

IP6Net.php

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class IP6Net extends Model
{
protected $table = "ip6nets";
protected $fillable = [
'rir_name',
'net_number',
'net_mask',
'net_broadcast',
'country',
'serial',
'created_at',
'updated_at'
];
public static function getNet($ip)
{
$where = 'INET6_ATON(net_number) <= INET6_ATON(?) and INET6_ATON(net_broadcast) >= INET6_ATON(?)';
return IP6Net::whereRaw($where, [$ip, $ip])
->orderByRaw('INET6_ATON(net_number), net_mask DESC')
->first();
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, Apr 6, 2:59 AM (2 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
96/0a/2f2f38bd42c021856de0d9d94a94
Default Alt Text
IP6Net.php (667 B)

Event Timeline