Merge branch 'develop'

This commit is contained in:
snipe 2017-11-10 15:56:34 -08:00
commit 4577ba39d7

View file

@ -188,14 +188,14 @@ class AssetModelsController extends Controller
'models.name',
'models.image',
'models.model_number',
]);
])->with('manufacturer');
if ($request->has('search')) {
$assetmodels = $assetmodels->where('models.name', 'LIKE', '%'.$request->get('search').'%')
->orWhere('models.model_number', 'LIKE', '%'.$request->get('search').'%');
}
$assetmodels = $assetmodels->paginate(50);
$assetmodels = $assetmodels->orderby('models.name', 'asc')->orderby('models.model_number', 'asc')->paginate(50);
foreach ($assetmodels as $assetmodel) {
$assetmodel->use_text = $assetmodel->present()->modelName;