Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117750380
ResourceSetting.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
963 B
Referenced Files
None
Subscribers
None
ResourceSetting.php
View Options
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\Relations\BelongsTo
;
/**
* A collection of settings for a Resource.
*
* @property int $id
* @property int $resource_id
* @property string $key
* @property string $value
*/
class
ResourceSetting
extends
Model
{
/** @var list<string> The attributes that are mass assignable */
protected
$fillable
=
[
'resource_id'
,
'key'
,
'value'
];
/**
* The resource to which this setting belongs.
*
* @return BelongsTo<Resource, $this>
*/
public
function
resource
()
{
return
$this
->
belongsTo
(
Resource
::
class
,
'resource_id'
,
'id'
);
}
/**
* Check if the setting is used in any storage backend.
*/
public
function
isBackendSetting
():
bool
{
return
(
\config
(
'app.with_imap'
)
||
\config
(
'app.with_ldap'
))
&&
(
$this
->
key
==
'invitation_policy'
||
$this
->
key
==
'folder'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Apr 4, 2:18 AM (1 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e6/4e/0b5cd207109d63ace7aa434dc447
Default Alt Text
ResourceSetting.php (963 B)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline