Merge branch 'master' of https://github.com/sebathefox/skolehjem-webapp
This commit is contained in:
commit
c505738592
|
@ -38,6 +38,32 @@ 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.
|
||||
*
|
||||
|
@ -236,6 +262,4 @@ class UserController extends Controller
|
|||
|
||||
return redirect()->route('users.login');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<img src="{{URL::asset('/images/icons/Vagttelefon-hvid.svg')}}" alt="Vagttelefon">
|
||||
Vagttelefon
|
||||
</a>
|
||||
<a href="#">
|
||||
<a href="{{ route("users.account") }}">
|
||||
<img src="{{URL::asset('/images/icons/user-hvid.svg')}}" alt="Konto">
|
||||
Konto
|
||||
</a>
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
@extends("app.layout.base")
|
||||
|
||||
@section("title")
|
||||
Account
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<main>
|
||||
<h1 class="text-center sde-blue mt-0">Konto</h1>
|
||||
<form action="">
|
||||
<h4 class="mt-0">Navn: {{ Auth::user()->name_first . " " . Auth::user()->name_last }}</h4>
|
||||
<h4 class="mt-0">Email: {{ Auth::user()->email }}</h4>
|
||||
<h4 class="mt-0">Telefon Nr.: {{ Auth::user()->phone }}</h4>
|
||||
<a class="btn text-center btn-sde-blue mt-1" href="{{ route("users.accountedit") }}">Rediger Oplysninger</a>
|
||||
</form>
|
||||
</main>
|
||||
@endsection
|
|
@ -0,0 +1,20 @@
|
|||
@extends("app.layout.base")
|
||||
|
||||
@section("title")
|
||||
Account
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<main>
|
||||
<h1 class="text-center sde-blue mt-0">Konto</h1>
|
||||
<form action="">
|
||||
<span>Navn:</span>
|
||||
<input type="text" name="name" id="name" value="{{ Auth::user()->name_first . " " . Auth::user()->name_last }}" disabled>
|
||||
<span>Email:</span>
|
||||
<input type="email" name="email" id="email" value="{{ Auth::user()->email }}" required>
|
||||
<span>Telefon Nr.:</span>
|
||||
<input type="text" name="phone" id="phone" value="{{ Auth::user()->phone }}" required>
|
||||
<button type="submit" class="btn text-center btn-sde-blue mt-1" href="tel:+4540886515">Rediger</button>
|
||||
</form>
|
||||
</main>
|
||||
@endsection
|
|
@ -25,6 +25,8 @@ Route::post("/login", "UserController@login")->name("users.login");
|
|||
Route::get("/logout", "UserController@logout")->name("users.logout");
|
||||
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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue