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\File;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class UserController extends Controller
|
class UserController extends Controller
|
||||||
{
|
{
|
||||||
@ -76,8 +77,13 @@ class UserController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
//View User:
|
//View User:
|
||||||
public function view() {
|
public function view($userID) {
|
||||||
return view('users.view');
|
|
||||||
|
$User = User::findOrFail($userID);
|
||||||
|
|
||||||
|
return view('users.view', [
|
||||||
|
'User' => $User
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Show Edit view
|
//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">
|
<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">
|
<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">
|
<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"-->
|
<!--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">
|
class="img-fluid" alt="Sample image">
|
||||||
|
|
||||||
</div>
|
</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">
|
<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">
|
class="img-fluid" alt="Sample image">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,44 +1,49 @@
|
|||||||
@extends('template')
|
@extends('template')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
<title>{{ Str::title(Auth::User()->username) }} megtekintése</title>
|
{{-- {{ Str::title($User->username) }} --}}
|
||||||
|
<title>Felhasználó megtekintése</title>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<section class="vh-100">
|
<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="row d-flex justify-content-center align-items-center h-100">
|
||||||
<div class="col-md-12 col-xl-4">
|
<div class="col-md-12 col-xl-4">
|
||||||
|
|
||||||
<div class="card bg-dark text-white" style="border-radius: 15px;">
|
<div class="card bg-dark text-white" style="border-radius: 15px;">
|
||||||
<div class="card-body text-center">
|
<div class="card-body text-center">
|
||||||
<div class="mt-3 mb-4">
|
<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;" />
|
class="rounded-circle img-fluid" style="width: 100px;" />
|
||||||
</div>
|
</div>
|
||||||
<h4 class="mb-2">{{Auth::User()->username}}</h4>
|
<h4 class="mb-2">{{ $User->username }}</h4>
|
||||||
<p class="text-white mb-4">{{Auth::User()->isAdmin == 1 ? '@Adminisztrátor' : '@Felhasználó'}} <span class="mx-2">|</span>
|
<p class="text-white mb-4">{{ $User->isAdmin == 1 ? '@Adminisztrátor' : '@Felhasználó' }} <span class="mx-2">|</span>
|
||||||
<a href="#!">{{Auth::User()->email}}</a>
|
<a href="#!">{{ $User->email }}</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="mb-4 pb-2">
|
<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>
|
<p class="text-white mb-4">Csatlakozás ideje</p>
|
||||||
</div>
|
</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>
|
<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 class="d-flex justify-content-between text-center mt-5 mb-2">
|
||||||
<div>
|
<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>
|
<p class="text-white mb-0">Játszmák száma</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-3">
|
<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>
|
<p class="text-white mb-0">Eltalált feladványok</p>
|
||||||
</div>
|
</div>
|
||||||
<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>
|
<p class="text-white mb-0">Találati arány</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user