diff --git a/SRC/app/Http/Controllers/AdminController.php b/SRC/app/Http/Controllers/AdminController.php index acaff12..f0af06b 100755 --- a/SRC/app/Http/Controllers/AdminController.php +++ b/SRC/app/Http/Controllers/AdminController.php @@ -1,5 +1,8 @@ 'Admin']); + $email = Auth::user()->email; + $me = DB::table('users')->where('email', $email)->first(); + $user = DB::table('users')->where('name','<>',"admin")->get(); + + return view('admin', ['nameRoute' => 'Admin', 'users' => $user, 'me' => $me]); } } diff --git a/SRC/app/Http/Controllers/ReferentController.php b/SRC/app/Http/Controllers/ReferentController.php index d5f66ec..e4f2c5a 100755 --- a/SRC/app/Http/Controllers/ReferentController.php +++ b/SRC/app/Http/Controllers/ReferentController.php @@ -1,5 +1,8 @@ 'Référent']); + $email = Auth::user()->email; + $me = DB::table('users')->where('email', $email)->first(); + return view('referent', ['nameRoute' => 'Référent', 'me' => $me]); } } diff --git a/SRC/resources/views/admin.blade.php b/SRC/resources/views/admin.blade.php index b9554d8..a1fcc96 100755 --- a/SRC/resources/views/admin.blade.php +++ b/SRC/resources/views/admin.blade.php @@ -2,9 +2,6 @@ @section('content') - - -
@@ -20,22 +17,17 @@ - where('name','<>',"admin")->get(); -foreach ($user as $ref) { - -?> - name; ?> - email; ?> + @foreach ($users as $user) + + {{$user->name}}> + {{$user->email}} Toulouse - + @endforeach diff --git a/SRC/resources/views/navbar_signed.blade.php b/SRC/resources/views/navbar_signed.blade.php index 50ae166..c8db805 100755 --- a/SRC/resources/views/navbar_signed.blade.php +++ b/SRC/resources/views/navbar_signed.blade.php @@ -1,14 +1,10 @@ -email; -$user = DB::table('users')->where('email', $email)->first(); -?>