Changeset View
Changeset View
Standalone View
Standalone View
src/app/SharedFolderSetting.php
<?php | <?php | ||||
namespace App; | namespace App; | ||||
use Illuminate\Database\Eloquent\Model; | use Illuminate\Database\Eloquent\Model; | ||||
/** | /** | ||||
* A collection of settings for a SharedFolder. | * A collection of settings for a SharedFolder. | ||||
* | * | ||||
* @property int $id | * @property int $id | ||||
* @property int $shared_folder_id | * @property int $shared_folder_id | ||||
* @property string $key | * @property string $key | ||||
* @property string $value | * @property string $value | ||||
*/ | */ | ||||
class SharedFolderSetting extends Model | class SharedFolderSetting extends Model | ||||
{ | { | ||||
protected $fillable = [ | /** @var array<int, string> The attributes that are mass assignable */ | ||||
'shared_folder_id', 'key', 'value' | protected $fillable = ['shared_folder_id', 'key', 'value']; | ||||
]; | |||||
/** | /** | ||||
* The folder to which this setting belongs. | * The folder to which this setting belongs. | ||||
* | * | ||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | ||||
*/ | */ | ||||
public function folder() | public function folder() | ||||
{ | { | ||||
return $this->belongsTo(\App\SharedFolder::class, 'shared_folder_id', 'id'); | return $this->belongsTo(SharedFolder::class, 'shared_folder_id', 'id'); | ||||
} | } | ||||
} | } |