diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index ea36151f2d..428d0f6d85 100644 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -145,7 +145,6 @@ class AssetsController extends AdminController { public function getCreate() { // Grab the dropdown list of models - $model_list = array('' => '') + Model::orderBy('name', 'desc')->lists('name', 'id'); // Grab the dropdown list of status @@ -383,7 +382,7 @@ class AssetsController extends AdminController { } // Get the dropdown of users and then pass it to the checkout view - $users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat(first_name," ",last_name) as full_name, id'))->whereNull('deleted_at')->lists('full_name', 'id'); + $users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat(first_name," ",last_name) as full_name, id'))->whereNull('deleted_at')->orderBy('last_name', 'asc')->orderBy('first_name', 'asc')->lists('full_name', 'id'); //print_r($users); return View::make('backend/hardware/checkout', compact('asset'))->with('users_list',$users_list);