diff --git a/app/Http/Controllers/Dashboard/AdminController.php b/app/Http/Controllers/Dashboard/AdminController.php index a9cbce46b..f3480e52d 100644 --- a/app/Http/Controllers/Dashboard/AdminController.php +++ b/app/Http/Controllers/Dashboard/AdminController.php @@ -100,6 +100,13 @@ class AdminController extends Controller array_push($userArr, $tempUser); } + /** + * Miscellaneous data for populating arrays + * + */ + $users = User::pluck('name')->all(); + $permissions = AvailableUserPermission::pluck('permission')->all(); + /** Entities for allowed logins */ $legacys = AllowedLogin::where(['login_type' => 'Legacy'])->pluck('entity_name')->toArray(); $renters = AllowedLogin::where(['login_type' => 'Renter'])->pluck('entity_name')->toArray(); @@ -111,7 +118,9 @@ class AdminController extends Controller $entities[] = $renter; } - return view('admin.dashboard')->with('userArr', $userArr) + return view('admin.dashboard')->with('users', $users) + ->with('permissions', $permissions) + ->with('userArr', $userArr) ->with('pis', $pis) ->with('industrys', $industrys) ->with('offices', $offices) diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php index b7badd222..e326dc420 100644 --- a/resources/views/admin/dashboard.blade.php +++ b/resources/views/admin/dashboard.blade.php @@ -59,8 +59,8 @@ {!! Form::open(['action' => 'Dashboard\AdminController@addPermission', 'method' => 'POST']) !!}