diff --git a/app/Http/Controllers/ChecklistController.php b/app/Http/Controllers/ChecklistController.php index 7cc0322a..360fbfbc 100644 --- a/app/Http/Controllers/ChecklistController.php +++ b/app/Http/Controllers/ChecklistController.php @@ -33,7 +33,7 @@ public function index(Request $request) { if (Auth::user()->hasRole('superadmin')) - $checklists = CheckList::all(); + $checklists = CheckList::with('users')->get(); else $checklists = $this->getUserChecklists()->get(); diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 70b9e018..fa8cc14d 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -26,7 +26,7 @@ public function index(Request $request) $show_stats = $request->filled('stats'); if (Auth::user()->hasRole('superadmin')) - $data = User::all(); + $data = User::with('roles')->get(); return view('users.index',compact('data', 'show_stats')); } diff --git a/composer.json b/composer.json index ff036af9..3de6883b 100644 --- a/composer.json +++ b/composer.json @@ -33,6 +33,7 @@ }, "require-dev": { "appzcoder/crud-generator": "^3.0", + "barryvdh/laravel-debugbar": "^3.4", "beyondcode/laravel-dump-server": "^1.0", "filp/whoops": "^2.0", "fzaninotto/faker": "^1.4", diff --git a/composer.lock b/composer.lock index 063c1f18..5852dd5e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fcda8e3f8f10c8a4a40b7ed586d915f0", + "content-hash": "227f888db05755c84b0eecb38f50ba0a", "packages": [ { "name": "asm89/stack-cors", @@ -6323,6 +6323,81 @@ ], "time": "2020-09-17T18:46:25+00:00" }, + { + "name": "barryvdh/laravel-debugbar", + "version": "v3.4.2", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-debugbar.git", + "reference": "91ee8b3acf0d72a4937f4855bd245acbda9910ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/91ee8b3acf0d72a4937f4855bd245acbda9910ac", + "reference": "91ee8b3acf0d72a4937f4855bd245acbda9910ac", + "shasum": "" + }, + "require": { + "illuminate/routing": "^5.5|^6|^7", + "illuminate/session": "^5.5|^6|^7", + "illuminate/support": "^5.5|^6|^7", + "maximebf/debugbar": "^1.16.3", + "php": ">=7.0", + "symfony/debug": "^3|^4|^5", + "symfony/finder": "^3|^4|^5" + }, + "require-dev": { + "orchestra/testbench": "^3.5|^4.0|^5.0", + "phpunit/phpunit": "^6.0|^7.0|^8.5|^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facade" + } + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\Debugbar\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "PHP Debugbar integration for Laravel", + "keywords": [ + "debug", + "debugbar", + "laravel", + "profiler", + "webprofiler" + ], + "funding": [ + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2020-08-30T07:08:17+00:00" + }, { "name": "beyondcode/laravel-dump-server", "version": "1.3.0", @@ -6562,6 +6637,67 @@ ], "time": "2020-07-09T08:09:16+00:00" }, + { + "name": "maximebf/debugbar", + "version": "v1.16.3", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "1a1605b8e9bacb34cc0c6278206d699772e1d372" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/1a1605b8e9bacb34cc0c6278206d699772e1d372", + "reference": "1a1605b8e9bacb34cc0c6278206d699772e1d372", + "shasum": "" + }, + "require": { + "php": "^7.1", + "psr/log": "^1.0", + "symfony/var-dumper": "^2.6|^3|^4|^5" + }, + "require-dev": { + "phpunit/phpunit": "^5" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.16-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "time": "2020-05-06T07:06:27+00:00" + }, { "name": "mockery/mockery", "version": "1.3.3", diff --git a/resources/views/measurement/index.blade.php b/resources/views/measurement/index.blade.php index 5254f273..bada0b96 100644 --- a/resources/views/measurement/index.blade.php +++ b/resources/views/measurement/index.blade.php @@ -59,7 +59,7 @@