Order by name in user drop down list
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user