Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117887421
IP6Net.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
667 B
Referenced Files
None
Subscribers
None
IP6Net.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline