diff --git a/SRC/app/Http/Controllers/AdminController.php b/SRC/app/Http/Controllers/AdminController.php index 1ade79b..23c5ba7 100755 --- a/SRC/app/Http/Controllers/AdminController.php +++ b/SRC/app/Http/Controllers/AdminController.php @@ -37,12 +37,11 @@ class AdminController extends Controller { { $user = new User; - $user->name = Input::get('firstname'); + $user->firstname = Input::get('firstname'); $user->email = Input::get('email'); $user->admin = 0; - - $city = Input::get('city'); - $lastname = Input::get('lastname'); + $user->city = Input::get('city'); + $user->lastname = Input::get('lastname'); $user->save(); return redirect('/admin')->with('message', 'Referent ajouté avec succès'); diff --git a/SRC/resources/views/admin.blade.php b/SRC/resources/views/admin.blade.php index c43becd..43500cd 100755 --- a/SRC/resources/views/admin.blade.php +++ b/SRC/resources/views/admin.blade.php @@ -17,6 +17,7 @@ Prénom Mail Lieu + Type utilisateur Se connecter Supprimer @@ -28,6 +29,11 @@ {{$user->firstname}} {{$user->email}} {{$user->city}} + @if ($user->admin == 0) + Référent + @else + Admin + @endif