From faa865c50f0395b852ac142d3c8f6b5019cce485 Mon Sep 17 00:00:00 2001 From: Anders Date: Tue, 30 Jun 2020 14:40:46 +0200 Subject: [PATCH] fixed --- .../app/Http/Controllers/UserController.php | 36 ++++++------------- .../views/app/users/account.blade.php | 10 +++--- .../resources/views/app/users/edit.blade.php | 2 +- skolehjem/routes/web.php | 1 - 4 files changed, 15 insertions(+), 34 deletions(-) diff --git a/skolehjem/app/Http/Controllers/UserController.php b/skolehjem/app/Http/Controllers/UserController.php index afa8d8b..d39c252 100644 --- a/skolehjem/app/Http/Controllers/UserController.php +++ b/skolehjem/app/Http/Controllers/UserController.php @@ -38,32 +38,6 @@ class UserController extends Controller return Response::detect("users.index", [ "users" => $users ]); } - /** - * Display a listing of the resource. - * - * @param Request $request - * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View - */ - public function account(Request $request) - { - $users = User::query()->paginate($request->query("page", 20)); - - return Response::detect("users.account", [ "users" => $users ]); - } - - /** - * Show the form for editing the specified resource. - * - * @param int $id - * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View - */ - public function accountedit(Request $request) - { - $users = User::query()->paginate($request->query("page", 20)); - - return Response::detect("users.edit", [ "users" => $users ]); - } - /** * Show the form for creating a new resource. * @@ -262,4 +236,14 @@ class UserController extends Controller return redirect()->route('users.login'); } + + public function account() + { + return Response::detect("users.account"); + } + + public function accountedit() + { + return Response::detect("users.edit"); + } } diff --git a/skolehjem/resources/views/app/users/account.blade.php b/skolehjem/resources/views/app/users/account.blade.php index 4c71d02..1572b8f 100644 --- a/skolehjem/resources/views/app/users/account.blade.php +++ b/skolehjem/resources/views/app/users/account.blade.php @@ -7,11 +7,9 @@ @section("content")

Konto

-
-

Navn: {{ Auth::user()->name_first . " " . Auth::user()->name_last }}

-

Email: {{ Auth::user()->email }}

-

Telefon Nr.: {{ Auth::user()->phone }}

- Rediger Oplysninger -
+

Navn: {{ Auth::user()->name_first . " " . Auth::user()->name_last }}

+

Email: {{ Auth::user()->email }}

+

Telefon Nr.: {{ Auth::user()->phone }}

+ Rediger Oplysninger
@endsection diff --git a/skolehjem/resources/views/app/users/edit.blade.php b/skolehjem/resources/views/app/users/edit.blade.php index be6a59a..73ee773 100644 --- a/skolehjem/resources/views/app/users/edit.blade.php +++ b/skolehjem/resources/views/app/users/edit.blade.php @@ -14,7 +14,7 @@ Telefon Nr.: - + @endsection diff --git a/skolehjem/routes/web.php b/skolehjem/routes/web.php index 78a2b47..38e1ae5 100644 --- a/skolehjem/routes/web.php +++ b/skolehjem/routes/web.php @@ -27,7 +27,6 @@ Route::get("/forgot", "UserController@showForgot")->name("users.show-forgot"); Route::post("/forgot", "UserController@forgot")->name("users.forgot"); Route::get("/account", "UserController@account")->name("users.account"); Route::get("/account/edit", "UserController@accountedit")->name("users.accountedit"); - Route::get("phones", "PhoneController@index")->name("phones.index");