Page MenuHomePhorge

ResourceSetting.php
No OneTemporary

Authored By
Unknown
Size
963 B
Referenced Files
None
Subscribers
None

ResourceSetting.php

<?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

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)

Event Timeline