Skip to content

Commit

Permalink
Optimization backend queries
Browse files Browse the repository at this point in the history
  • Loading branch information
pvgennip committed Oct 23, 2020
1 parent 4ad49fc commit 7ccf700
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/ChecklistController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
138 changes: 137 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion resources/views/measurement/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<tr>
<td>{{ $item->id }}</td>
<td>{{ $item->abbreviation }}</td>
<td>{{ $item->pq_name_unit() }}</td>
<td>{{ $item->pq_name_unit }}</td>
<td>{{ isset($item->show_in_charts) && 1 == $item->show_in_charts ? 'Yes' : 'No' }}</td>
<td>{{ $item->chart_group }}</td>
<td>{{ $item->min_value }}</td>
Expand Down
3 changes: 1 addition & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
|
*/

Auth::routes();
Auth::routes(['verify' => true]);

Route::get('/',function(){
return redirect('https://beep.nl');
Expand Down Expand Up @@ -135,4 +135,3 @@ function()

}
);
Auth::routes(['verify' => true]);
2 changes: 2 additions & 0 deletions storage/debugbar/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore

0 comments on commit 7ccf700

Please sign in to comment.