I'm writing an application where the model I'm trying to display on the table points to a "Location" model on 2 separate relationships, one for "pickup" and one for "dropoff", the issue is that when the table is displaying it shows the same value on both columns
My columns method looks like this:
public function columns()
{
return [
...
Column::name("pickup_location.name")->label("Pickup Location"),
Column::name("dropoff_location.name")->label("Dropoff Location"),
...
];
}
and the relationships on the model are:
public function pickup_location()
{
return $this->belongsTo(Location::class, 'pickup_location_id');
}
public function dropoff_location()
{
return $this->belongsTo(Location::class, 'dropoff_location_id');
}
Is there something am I doing wrong here? or is it possible that this is a bug?
I'm writing an application where the model I'm trying to display on the table points to a "Location" model on 2 separate relationships, one for "pickup" and one for "dropoff", the issue is that when the table is displaying it shows the same value on both columns
My columns method looks like this:
and the relationships on the model are:
Is there something am I doing wrong here? or is it possible that this is a bug?