Changeset View
Changeset View
Standalone View
Standalone View
src/app/GroupSetting.php
- This file was added.
<?php | |||||
namespace App; | |||||
use Illuminate\Database\Eloquent\Model; | |||||
/** | |||||
* A collection of settings for a Group. | |||||
* | |||||
* @property int $id | |||||
* @property int $group_id | |||||
* @property string $key | |||||
* @property string $value | |||||
*/ | |||||
class GroupSetting extends Model | |||||
{ | |||||
protected $fillable = [ | |||||
'group_id', 'key', 'value' | |||||
]; | |||||
/** | |||||
* The group to which this setting belongs. | |||||
* | |||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo | |||||
*/ | |||||
public function group() | |||||
{ | |||||
return $this->belongsTo(\App\Group::class, 'group_id', 'id'); | |||||
} | |||||
} |