mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Fixed sorting issue in asset models when ordering by manufacturer
This commit is contained in:
parent
e44e573a3c
commit
02720f225c
|
@ -55,7 +55,7 @@ class AssetModelsController extends Controller
|
|||
$assetmodels->OrderManufacturer($order);
|
||||
break;
|
||||
default:
|
||||
$assetmodels->orderBy($sort, $order);
|
||||
$assetmodels->orderBy('models'.$sort, $order);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ class AssetModel extends SnipeModel
|
|||
public function scopeTextSearch($query, $search)
|
||||
{
|
||||
|
||||
return $query->where('name', 'LIKE', "%$search%")
|
||||
return $query->where('models.name', 'LIKE', "%$search%")
|
||||
->orWhere('model_number', 'LIKE', "%$search%")
|
||||
->orWhere(function ($query) use ($search) {
|
||||
$query->whereHas('depreciation', function ($query) use ($search) {
|
||||
|
|
Loading…
Reference in a new issue