Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F8200496
RateLimitWhitelist.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
905 B
Referenced Files
None
Subscribers
None
RateLimitWhitelist.php
View Options
<?php
namespace
App\Policy
;
use
Illuminate\Database\Eloquent\Model
;
class
RateLimitWhitelist
extends
Model
{
/** @var array<int, string> The attributes that are mass assignable */
protected
$fillable
=
[
'whitelistable_id'
,
'whitelistable_type'
,
];
/** @var string Database table name */
protected
$table
=
'policy_ratelimit_wl'
;
/**
* Principally whitelistable object such as Domain, User.
*
* @return mixed
*/
public
function
whitelistable
()
{
return
$this
->
morphTo
();
}
/**
* Check whether a specified object is whitelisted.
*
* @param object $object An object (User, Domain, etc.)
*/
public
static
function
isListed
(
$object
):
bool
{
return
self
::
where
(
'whitelistable_type'
,
$object
::
class
)
->
where
(
'whitelistable_id'
,
$object
->
id
)
->
exists
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Jul 9, 1:49 AM (6 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1052521
Default Alt Text
RateLimitWhitelist.php (905 B)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment