2018-02-04 20:50:59 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2022-11-25 00:35:56 +00:00
|
|
|
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;
|
|
|
|
|
2022-11-25 00:35:56 +00:00
|
|
|
/**
|
|
|
|
* @return HasMany
|
|
|
|
*/
|
|
|
|
public function settings(): HasMany
|
2018-02-04 20:50:59 +00:00
|
|
|
{
|
2022-03-19 13:54:33 +00:00
|
|
|
return $this->hasMany(\App\Setting::class, 'group_id');
|
2018-02-04 20:50:59 +00:00
|
|
|
}
|
|
|
|
}
|