'array', 'cargo' => 'array', 'rng_seed' => 'integer', 'merchants' => 'integer', 'route_id' => 'integer', 'offer' => 'boolean', 'sent_at' => 'immutable_datetime', 'arrives_at' => 'immutable_datetime', 'visible_at' => 'immutable_datetime', ]; } public function origin(): BelongsTo { return $this->belongsTo(Village::class, 'origin_id'); } public function target(): BelongsTo { return $this->belongsTo(Village::class, 'target_id'); } /** Where the troops belong: a return trip goes there, the others start there. */ public function homeId(): int { return in_array($this->type, [self::RETURN, self::TRADE_RETURN], true) ? $this->target_id : $this->origin_id; } }