diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php index 70f3f94..32239d9 100644 --- a/app/Http/Controllers/UsersController.php +++ b/app/Http/Controllers/UsersController.php @@ -168,5 +168,17 @@ public function edit($id) { $user = User::findOrFail($id); return view('users.edit', compact('user')); } + + /* + * + */ + public function reset_password($id) { + + $user = User::findOrFail($id); + //dd($user); + return view('users.reset_password', compact('user')); + + } + } diff --git a/resources/views/users/create.blade.php b/resources/views/users/create.blade.php index e1cdd0d..56fca06 100644 --- a/resources/views/users/create.blade.php +++ b/resources/views/users/create.blade.php @@ -5,7 +5,7 @@
-
Create New User
+
Create New User Users List
@if($errors->any()) diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index 19f3adf..3197740 100644 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -8,7 +8,7 @@
diff --git a/resources/views/users/reset_password.blade.php b/resources/views/users/reset_password.blade.php new file mode 100644 index 0000000..3ce1f1c --- /dev/null +++ b/resources/views/users/reset_password.blade.php @@ -0,0 +1,67 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
Reset Password for user : {{ $user->username }} + Users List + | + users_id/edit") }}" style="float: right;">Edit User +
+
+ + @if($errors->any()) +
    + @foreach($errors->all() as $error) +
  • {{ $error }}
  • + @endforeach +
+ @endif + + +
+ + {{ csrf_field() }} + +
+ + +
+ + + @if ($errors->has('password')) + + {{ $errors->first('password') }} + + @endif +
+
+ +
+ + +
+ +
+
+ + +
+
+ +
+
+ +
+ +
+
+
+
+
+@endsection + diff --git a/resources/views/users/show.blade.php b/resources/views/users/show.blade.php index e5995c4..f0c04c9 100644 --- a/resources/views/users/show.blade.php +++ b/resources/views/users/show.blade.php @@ -5,7 +5,11 @@
-
User : {{ $user->username }} id/edit")}}" style="float: right">Edit
+
User : {{ $user->username }} + Users List + | + users_id/edit")}}" style="float: right">Edit +

Username : {{ $user->username }}

diff --git a/routes/web.php b/routes/web.php index a347f46..304ae16 100644 --- a/routes/web.php +++ b/routes/web.php @@ -61,4 +61,6 @@ Route::post('users', 'UsersController@store'); Route::get('users/{id}/edit', 'UsersController@edit'); Route::patch('users/{id}', 'UsersController@update'); -Route::delete('users/{id}', 'UsersController@destroy'); \ No newline at end of file +Route::delete('users/{id}', 'UsersController@destroy'); + +Route::get('users/{id}/reset_password', 'UsersController@reset_password'); \ No newline at end of file