Closed bamalik1996 closed 6 months ago
Hi @bamalik1996, You need to specify the alias with the model name:
$this->hasManyDeep(
Vehicle::class,
[MedallionNumber::class, Vehicle::class . ' as vehicles2'],
^^^^^^^^^^^^^^
Vehicle::class . ' as vehicles2'
@staudenmeir Thank you its work.
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as
vehicles2.vin_number2
=vehicles
.vin_number1
inner joinmedallions
on' at line 1