'required|unique:component_groups', ]; /** * The fillable properties. * * @var string[] */ protected $fillable = ['name']; /** * The attributes that should be mutated to dates. * * @var array */ protected $dates = ['deleted_at']; /** * A group can have many components. * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function components() { return $this->hasMany('CachetHQ\Cachet\Models\Component', 'group_id', 'id'); } }