$resolvedDependencies */ class ModDependency extends Model { /** @use HasFactory */ use HasFactory; /** * The relationship between the mod dependency and the mod version. * * @return BelongsTo */ public function modVersion(): BelongsTo { return $this->belongsTo(ModVersion::class); } /** * The relationship between the mod dependency and the resolved dependency. * * @return HasMany */ public function resolvedDependencies(): HasMany { return $this->hasMany(ModResolvedDependency::class, 'dependency_id') ->chaperone(); } /** * The relationship between the mod dependency and the dependent mod. * * @return BelongsTo */ public function dependentMod(): BelongsTo { return $this->belongsTo(Mod::class, 'dependent_mod_id'); } /** * The attributes that should be cast to native types. */ protected function casts(): array { return [ 'created_at' => 'datetime', 'updated_at' => 'datetime', ]; } }