From 49981c8c6c2acbcfd7ffbc5ffbdb556e7bb5fe5b Mon Sep 17 00:00:00 2001 From: Julian Prieber <60265788+JulianPrieber@users.noreply.github.com> Date: Tue, 12 Jul 2022 16:10:49 +0200 Subject: [PATCH] Now displaying user's emails on user page --- app/Http/Controllers/AdminController.php | 8 ++++---- resources/views/panel/users.blade.php | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index bf90af8..06dba51 100755 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -40,19 +40,19 @@ class AdminController extends Controller switch($usersType){ case 'all': - $data['users'] = User::select('id', 'name', 'littlelink_name', 'role', 'block', 'email_verified_at')->get(); + $data['users'] = User::select('id', 'name', 'email', 'littlelink_name', 'role', 'block', 'email_verified_at')->get(); return view('panel/users', $data); break; case 'user': - $data['users'] = User::where('role', 'user')->select('id', 'name', 'littlelink_name', 'role', 'block', 'email_verified_at')->get(); + $data['users'] = User::where('role', 'email', 'user')->select('id', 'name', 'littlelink_name', 'role', 'block', 'email_verified_at')->get(); return view('panel/users', $data); break; case 'vip': - $data['users'] = User::where('role', 'vip')->select('id', 'name', 'littlelink_name', 'role', 'block', 'email_verified_at')->get(); + $data['users'] = User::where('role', 'email', 'vip')->select('id', 'name', 'littlelink_name', 'role', 'block', 'email_verified_at')->get(); return view('panel/users', $data); break; case 'admin': - $data['users'] = User::where('role', 'admin')->select('id', 'name', 'littlelink_name', 'role', 'block', 'email_verified_at')->get(); + $data['users'] = User::where('role', 'email', 'admin')->select('id', 'name', 'littlelink_name', 'role', 'block', 'email_verified_at')->get(); return view('panel/users', $data); break; } diff --git a/resources/views/panel/users.blade.php b/resources/views/panel/users.blade.php index 2190ec8..f1ae1be 100755 --- a/resources/views/panel/users.blade.php +++ b/resources/views/panel/users.blade.php @@ -23,6 +23,7 @@ Name + E-Mail Page Role Edit @@ -36,6 +37,7 @@ @foreach($users as $user) {{ $user->name }} + {{ $user->email }}   {{ $user->littlelink_name }} {{ $user->role }} Edit