mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Use table alias for models join in search/order by models
This commit is contained in:
parent
0396267388
commit
3e5e6ba99a
|
@ -963,7 +963,7 @@ class Asset extends Depreciable
|
|||
*/
|
||||
public function scopeOrderModels($query, $order)
|
||||
{
|
||||
return $query->join('models', 'assets.model_id', '=', 'models.id')->orderBy('models.name', $order);
|
||||
return $query->join('models as asset_models', 'assets.model_id', '=', 'models.id')->orderBy('models.name', $order);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue