Merge branch 'develop'

This commit is contained in:
snipe 2017-10-10 23:38:45 -07:00
commit afbd6c811b

View file

@ -153,17 +153,17 @@ class AssetModel extends SnipeModel
->orWhere('model_number', 'LIKE', "%$search%") ->orWhere('model_number', 'LIKE', "%$search%")
->orWhere(function ($query) use ($search) { ->orWhere(function ($query) use ($search) {
$query->whereHas('depreciation', function ($query) use ($search) { $query->whereHas('depreciation', function ($query) use ($search) {
$query->where('name', 'LIKE', '%'.$search.'%'); $query->where('depreciations.name', 'LIKE', '%'.$search.'%');
}); });
}) })
->orWhere(function ($query) use ($search) { ->orWhere(function ($query) use ($search) {
$query->whereHas('category', function ($query) use ($search) { $query->whereHas('category', function ($query) use ($search) {
$query->where('name', 'LIKE', '%'.$search.'%'); $query->where('categories.name', 'LIKE', '%'.$search.'%');
}); });
}) })
->orWhere(function ($query) use ($search) { ->orWhere(function ($query) use ($search) {
$query->whereHas('manufacturer', function ($query) use ($search) { $query->whereHas('manufacturer', function ($query) use ($search) {
$query->where('name', 'LIKE', '%'.$search.'%'); $query->where('manufacturers.name', 'LIKE', '%'.$search.'%');
}); });
}); });