mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Added helper for dept list
This commit is contained in:
parent
64f17cecbf
commit
a7592de304
|
@ -4,6 +4,7 @@ namespace App\Helpers;
|
||||||
use DB;
|
use DB;
|
||||||
use App\Models\Statuslabel;
|
use App\Models\Statuslabel;
|
||||||
use App\Models\Location;
|
use App\Models\Location;
|
||||||
|
use App\Models\Department;
|
||||||
use App\Models\AssetModel;
|
use App\Models\AssetModel;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
@ -184,6 +185,25 @@ class Helper
|
||||||
return $category_list;
|
return $category_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the list of categories in an array to make a dropdown menu
|
||||||
|
*
|
||||||
|
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||||
|
* @since [v2.5]
|
||||||
|
* @return Array
|
||||||
|
*/
|
||||||
|
public static function departmentList()
|
||||||
|
{
|
||||||
|
$departments = Department::orderBy('name', 'asc')
|
||||||
|
->whereNull('deleted_at')
|
||||||
|
->orderBy('name', 'asc');
|
||||||
|
|
||||||
|
return array('' => trans('general.select_department')) + $departments->pluck('name', 'id')->toArray();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the list of suppliers in an array to make a dropdown menu
|
* Get the list of suppliers in an array to make a dropdown menu
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue