Merge branch 'master' of https://github.com/sebathefox/skolehjem-webapp into master
This commit is contained in:
commit
d0b286c714
|
@ -340,6 +340,7 @@ class UserController extends Controller
|
|||
} else if($request->file("resource")) { // Else if you're editing the profile pic
|
||||
$user->update([ "resource_id" => ResourceController::store($request)->id ]);
|
||||
|
||||
|
||||
return redirect()->route("users.account");
|
||||
} else { // Else if you're not editing the password but anything else (Email, Phone Number). Then update user.
|
||||
$data = $request->only(['email', 'phone']);
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
@csrf
|
||||
@method("put")
|
||||
|
||||
@if(\App\Resource::query()->where("resource_id", "=",Auth::user()->resource_id)->first() != null)
|
||||
<img style="width: calc(100% - 72px); margin: auto;" src="{{ \App\Resource::query()->where("resource_id", "=",Auth::user()->resource_id)->first()->filename }}">
|
||||
@if(\App\Resource::query()->where("id", "=", Auth::user()->resource_id)->first() !== null)
|
||||
<img style="width: calc(100% - 72px); margin: auto;" src="{{ \App\Resource::query()->where("id", "=",Auth::user()->resource_id)->first()->filename }}">
|
||||
@else
|
||||
@if(request()->cookie("mode") == "dark")
|
||||
<img style="width: calc(100% - 72px); margin: auto;" src="{{ asset("/images/icons/user-hvid.svg") }}">
|
||||
|
|
Loading…
Reference in New Issue