order applist in dropdown by name

This commit is contained in:
Kode 2018-11-04 15:27:57 +00:00
parent 7a02986982
commit b30f1730e4

View file

@ -40,7 +40,7 @@ class Application extends Model
public static function applist() public static function applist()
{ {
$list = []; $list = [];
$all = self::all(); $all = self::orderBy('name')->get();
$list['null'] = 'None'; $list['null'] = 'None';
foreach($all as $app) { foreach($all as $app) {
$name = $app->name; $name = $app->name;