hasManyThrough(Sensor::class, SensorToStateIndex::class, 'state_index_id', 'sensor_id', 'state_index_id', 'sensor_id'); } public function translations(): HasMany { return $this->hasMany(StateTranslation::class, 'state_index_id', 'state_index_id'); } }