Merge branch 'main' of https://github.com/gyorkistamas/afp1_nagy_ncob
This commit is contained in:
@ -11,6 +11,7 @@ use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
@ -76,8 +77,13 @@ class UserController extends Controller
|
||||
}
|
||||
|
||||
//View User:
|
||||
public function view() {
|
||||
return view('users.view');
|
||||
public function view($userID) {
|
||||
|
||||
$User = User::findOrFail($userID);
|
||||
|
||||
return view('users.view', [
|
||||
'User' => $User
|
||||
]);
|
||||
}
|
||||
|
||||
//Show Edit view
|
||||
|
BIN
picquiz/public/images/samplePictures/login_pic.jpg
Normal file
BIN
picquiz/public/images/samplePictures/login_pic.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 528 KiB |
BIN
picquiz/public/images/samplePictures/reg_pic.jpg
Normal file
BIN
picquiz/public/images/samplePictures/reg_pic.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 263 KiB |
Binary file not shown.
Before Width: | Height: | Size: 29 KiB |
@ -8,7 +8,7 @@
|
||||
|
||||
<section class="vh-100">
|
||||
|
||||
<div class="container h-100">
|
||||
<div class="container h-70">
|
||||
|
||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||
|
||||
@ -78,7 +78,7 @@
|
||||
|
||||
<div class="col-md-10 col-lg-6 col-xl-7 d-flex align-items-center order-1 order-lg-2">
|
||||
<!--src="https://mdbcdn.b-cdn.net/img/Photos/new-templates/bootstrap-registration/draw1.webp"-->
|
||||
<img src="https://mdbcdn.b-cdn.net/img/Photos/new-templates/bootstrap-registration/draw1.webp"
|
||||
<img src= {{ asset('images/samplePictures/login_pic.jpg') }}
|
||||
class="img-fluid" alt="Sample image">
|
||||
|
||||
</div>
|
||||
|
@ -154,7 +154,7 @@
|
||||
|
||||
<div class="col-md-10 col-lg-6 col-xl-7 d-flex align-items-center order-1 order-lg-2">
|
||||
|
||||
<img src="https://mdbcdn.b-cdn.net/img/Photos/new-templates/bootstrap-registration/draw1.webp"
|
||||
<img src={{ asset('images/samplePictures/reg_pic.jpg') }}
|
||||
class="img-fluid" alt="Sample image">
|
||||
|
||||
</div>
|
||||
|
@ -1,44 +1,49 @@
|
||||
@extends('template')
|
||||
|
||||
@section('title')
|
||||
<title>{{ Str::title(Auth::User()->username) }} megtekintése</title>
|
||||
{{-- {{ Str::title($User->username) }} --}}
|
||||
<title>Felhasználó megtekintése</title>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<section class="vh-100">
|
||||
<div class="container py-5 h-100">
|
||||
<div class="container h-70">
|
||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||
<div class="col-md-12 col-xl-4">
|
||||
|
||||
<div class="card bg-dark text-white" style="border-radius: 15px;">
|
||||
<div class="card-body text-center">
|
||||
<div class="mt-3 mb-4">
|
||||
<img src="{{ asset(Auth::User()->profile_picture) }}"
|
||||
<img src="{{ asset($User->profile_picture) }}"
|
||||
class="rounded-circle img-fluid" style="width: 100px;" />
|
||||
</div>
|
||||
<h4 class="mb-2">{{Auth::User()->username}}</h4>
|
||||
<p class="text-white mb-4">{{Auth::User()->isAdmin == 1 ? '@Adminisztrátor' : '@Felhasználó'}} <span class="mx-2">|</span>
|
||||
<a href="#!">{{Auth::User()->email}}</a>
|
||||
<h4 class="mb-2">{{ $User->username }}</h4>
|
||||
<p class="text-white mb-4">{{ $User->isAdmin == 1 ? '@Adminisztrátor' : '@Felhasználó' }} <span class="mx-2">|</span>
|
||||
<a href="#!">{{ $User->email }}</a>
|
||||
</p>
|
||||
|
||||
<div class="mb-4 pb-2">
|
||||
<p class="mb-2 h5">{{Auth::User()->created_at}}</p>
|
||||
<p class="mb-2 h5">{{ $User->created_at }}</p>
|
||||
<p class="text-white mb-4">Csatlakozás ideje</p>
|
||||
</div>
|
||||
|
||||
{!! $User->id == Auth::User()->id ? "<a class='btn btn-success btn-rounded btn-lg' href='/users/edit'>Profil szerkesztése</a>" : "" !!}
|
||||
{{-- @if ($User->id == Auth::User()->id)
|
||||
<a class="btn btn-success btn-rounded btn-lg" href="/users/edit">Profil szerkesztése</a>
|
||||
@endif --}}
|
||||
|
||||
<div class="d-flex justify-content-between text-center mt-5 mb-2">
|
||||
<div>
|
||||
<p class="mb-2 h5">{{Auth::User()->numberOfGames}}</p>
|
||||
<p class="mb-2 h5">{{ $User->numberOfGames }}</p>
|
||||
<p class="text-white mb-0">Játszmák száma</p>
|
||||
</div>
|
||||
<div class="px-3">
|
||||
<p class="mb-2 h5">{{Auth::User()->numberOfHits}}</p>
|
||||
<p class="mb-2 h5">{{ $User->numberOfHits }}</p>
|
||||
<p class="text-white mb-0">Eltalált feladványok</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="mb-2 h5">{{ Auth::User()->numberOfGames == 0 ? 0 : (Auth::User()->numberOfHits / Auth::User()->numberOfGames) * 100 }} %</p>
|
||||
<p class="mb-2 h5">{{ $User->numberOfGames == 0 ? 0 : ($User->numberOfHits / $User->numberOfGames) * 100 }} %</p>
|
||||
<p class="text-white mb-0">Találati arány</p>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user