menambahkan list user pada admin

This commit is contained in:
raditya09 2023-08-04 22:44:14 +07:00
parent 7543be0fc9
commit e80dcb8535
6 changed files with 85 additions and 13 deletions

View File

@ -0,0 +1,17 @@
<?php
namespace App\Http\Controllers\Adminbackend;
use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Http\Request;
class ListUserController extends Controller
{
//
public function index()
{
$users = User::all();
return view('admin_backend.admin_listuser', compact('users'));
}
}

23
composer.lock generated
View File

@ -1200,16 +1200,16 @@
}, },
{ {
"name": "laravel/serializable-closure", "name": "laravel/serializable-closure",
"version": "v1.3.0", "version": "v1.3.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/serializable-closure.git", "url": "https://github.com/laravel/serializable-closure.git",
"reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37" "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/e5a3057a5591e1cfe8183034b0203921abe2c902",
"reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1256,7 +1256,7 @@
"issues": "https://github.com/laravel/serializable-closure/issues", "issues": "https://github.com/laravel/serializable-closure/issues",
"source": "https://github.com/laravel/serializable-closure" "source": "https://github.com/laravel/serializable-closure"
}, },
"time": "2023-01-30T18:31:20+00:00" "time": "2023-07-14T13:56:28+00:00"
}, },
{ {
"name": "laravel/tinker", "name": "laravel/tinker",
@ -6350,16 +6350,16 @@
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "9.2.26", "version": "9.2.27",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1",
"reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6415,7 +6415,8 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27"
}, },
"funding": [ "funding": [
{ {
@ -6423,7 +6424,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-03-06T12:58:08+00:00" "time": "2023-07-26T13:44:30+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",

View File

@ -0,0 +1,54 @@
@extends('admin_backend/layouts.template')
@section('content')
<main id="main" class="main">
<div class="pagetitle">
<h1>Admin Dashboard</h1>
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/admin">Home</a></li>
<li class="breadcrumb-item active">List User</li>
</ol>
</nav>
</div><!-- End Page Title -->
<section class="section dashboard">
<div class="row">
<h3>List User</h3>
<table>
<thead>
<tr>
<th>id</th>
<th>Nama Lengkap</th>
<th>NIM</th>
<th>Semester</th>
<th>Angkatan</th>
<th>E-Mail</th>
<th>Role</th>
<!-- Tambahkan kolom-kolom lain yang ingin Anda tampilkan -->
</tr>
</thead>
<tbody>
@foreach($users as $user)
<tr>
<td>{{ $user->id}}</td>
<td>{{ $user->nama_lengkap }}</td>
<td>{{ $user->nim }}</td>
<td>{{ $user->semester }}</td>
<td>{{ $user->angkatan }}</td>
<td>{{ $user->email }}</td>
<td>{{ $user->kelas_user }}</td>
<!-- Tambahkan kolom-kolom lain yang ingin Anda tampilkan -->
</tr>
@endforeach
</tbody>
</table>
</div>
</section>
</main><!-- End #main -->
@endsection

View File

@ -27,7 +27,7 @@
</li><!-- End Profile Page Nav --> </li><!-- End Profile Page Nav -->
<li class="nav-item"> <li class="nav-item">
<a class="nav-link collapsed" href="{{ asset('admin_backend/user-profile.html')}}"> <a class="nav-link collapsed" href="/listuser">
<i class="bi bi-person"></i> <i class="bi bi-person"></i>
<span>List User</span> <span>List User</span>
</a> </a>

View File

@ -8,7 +8,6 @@
<nav> <nav>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/dashboard">Home</a></li> <li class="breadcrumb-item"><a href="/dashboard">Home</a></li>
<li class="breadcrumb-item">user</li>
<li class="breadcrumb-item active">Profile</li> <li class="breadcrumb-item active">Profile</li>
</ol> </ol>
</nav> </nav>

View File

@ -40,6 +40,7 @@
Route::group(['namespace'=>'AdminBackend'], function() Route::group(['namespace'=>'AdminBackend'], function()
{ {
Route::resource('admin', 'AdminDashboardController'); Route::resource('admin', 'AdminDashboardController');
Route::resource('listuser', 'ListUserController');
}); });
}); });