Fixes #1626 - correctly show deleted models

This commit is contained in:
snipe
2016-01-13 07:34:02 -08:00
parent 348c8f62d1
commit 1908499379
3 changed files with 9 additions and 3 deletions
+7 -1
View File
@@ -401,7 +401,13 @@ class ModelsController extends AdminController
public function getDatatable($status = null)
{
$models = Model::with('category','assets','depreciation');
($status != 'Deleted') ?: $models->withTrashed()->Deleted();
switch ($status) {
case 'Deleted':
$models->withTrashed()->Deleted();
break;
}
if (Input::has('search')) {
$models = $models->TextSearch(Input::get('search'));