user lista
This commit is contained in:
parent
181925bb41
commit
8579be36f0
@ -44,7 +44,7 @@
|
||||
@if (Auth::check() && Auth::User()->isAdmin == 1)
|
||||
|
||||
<li class="nav-item mt-2 mt-lg-0">
|
||||
<a href="#" class="nav-link navitem mt-2 mt-xl-0"><img
|
||||
<a href="/UserList" class="nav-link navitem mt-2 mt-xl-0"><img
|
||||
src="/images/icons/listUsersIcon.png">Felhasználók</a>
|
||||
</li>
|
||||
|
||||
|
64
picquiz/resources/views/users/list.blade.php
Normal file
64
picquiz/resources/views/users/list.blade.php
Normal file
@ -0,0 +1,64 @@
|
||||
@extends('template')
|
||||
|
||||
@php
|
||||
$users = DB::table('users')->get();
|
||||
@endphp
|
||||
|
||||
@section('title')
|
||||
<title>Felhasználó lista</title>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="container bg-dark text-white p-4 rounded-3" style="--bs-bg-opacity: .98;">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
<h1>Felhasználók listája:</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@foreach ($users as $user)
|
||||
<hr class="mt-2 d-block">
|
||||
|
||||
<div class="row" style="justify-content: space-between;">
|
||||
<div class="col-8">
|
||||
<div class="col-2">
|
||||
<img class="col-12"
|
||||
src="{{ $user->profile_picture }}"
|
||||
onerror="this.onerror=null; this.src='images/undefined.jpg'"
|
||||
>
|
||||
</img>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<h1>{{ $user->username }}</h1>
|
||||
<h4><nobr>Csatlakozott: {{ $user->created_at }}</nobr></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-12 float-right">
|
||||
<a href="" class="btn btn-success col-12 mb-4">Profil</a>
|
||||
<div class="col-12">
|
||||
<h4 class="d-inline">admin?</h4>
|
||||
@if ($user->isAdmin)
|
||||
<span class="text-success">Igen</span>
|
||||
@else
|
||||
<span class="text-danger">Nem</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<h4 class="d-inline">Bannolva?</h4>
|
||||
@if ($user->isBanned)
|
||||
<span class="text-danger">Igen</span>
|
||||
@else
|
||||
<span class="text-success">Nem</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<hr class="mt-2 d-block">
|
||||
</div>
|
||||
|
||||
@endsection
|
@ -63,4 +63,5 @@ Route::get('/play', function(){ return view('game/game'); });
|
||||
|
||||
//--------- Admin routes --------------------------------------------
|
||||
|
||||
Route::get('/UserDoList', [UserListController::class, 'do_list']);
|
||||
//Route::get('/UserDoList', [UserListController::class, 'do_list']);
|
||||
Route::get('/UserList', function() {return view('users/list'); } );
|
||||
|
Loading…
x
Reference in New Issue
Block a user