Heimdall/app/SettingGroup.php

48 lines
1.3 KiB
PHP
Raw Normal View History

2018-02-04 20:50:59 +00:00
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
2018-02-04 20:50:59 +00:00
2022-11-29 22:13:24 +00:00
/**
* App\SettingGroup
*
* @property int $id
* @property string $title
* @property int $order
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Setting[] $settings
* @property-read int|null $settings_count
* @method static \Illuminate\Database\Eloquent\Builder|SettingGroup newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|SettingGroup newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|SettingGroup query()
* @method static \Illuminate\Database\Eloquent\Builder|SettingGroup whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|SettingGroup whereOrder($value)
* @method static \Illuminate\Database\Eloquent\Builder|SettingGroup whereTitle($value)
* @mixin \Eloquent
*/
2018-02-04 20:50:59 +00:00
class SettingGroup extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'setting_groups';
/**
* Tell the Model this Table doesn't support timestamps.
*
* @var bool
*/
public $timestamps = false;
/**
* @return HasMany
*/
public function settings(): HasMany
2018-02-04 20:50:59 +00:00
{
return $this->hasMany(\App\Setting::class, 'group_id');
2018-02-04 20:50:59 +00:00
}
}