Halaman Admin
This commit is contained in:
parent
b1401c476d
commit
c4072d9fac
|
|
@ -24,15 +24,18 @@ public function create(): View
|
||||||
*/
|
*/
|
||||||
public function store(LoginRequest $request)
|
public function store(LoginRequest $request)
|
||||||
{
|
{
|
||||||
$request->authenticate();
|
$auth_status = $request->authenticate();
|
||||||
|
|
||||||
|
if(!$auth_status['auth_status']) {
|
||||||
|
return response()->json([
|
||||||
|
'status' => false,
|
||||||
|
'msg' => 'Auth Failed'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
$request->session()->regenerate();
|
$request->session()->regenerate();
|
||||||
|
|
||||||
if(Auth::user()->role == 'admin') {
|
session(['who_roles' => Auth::user()->role]);
|
||||||
session(['is_logged_in_admin' => true]);
|
|
||||||
} else {
|
|
||||||
session(['is_logged_in_admin' => false]);
|
|
||||||
}
|
|
||||||
|
|
||||||
session(['is_logged_in' => true]);
|
session(['is_logged_in' => true]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class UsersController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display data for javascript ajax
|
||||||
|
*/
|
||||||
|
public function getData() {
|
||||||
|
$data = User::get();
|
||||||
|
return response()->json([
|
||||||
|
'status' => true,
|
||||||
|
'data' => $data->toArray()
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
return view('admin.pages.data_user.index');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*/
|
||||||
|
public function show(string $id)
|
||||||
|
{
|
||||||
|
$data = User::where('id', $id)->get();
|
||||||
|
return response()->json([
|
||||||
|
'status' => true,
|
||||||
|
'data' => $data[0]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*/
|
||||||
|
public function edit(string $id)
|
||||||
|
{
|
||||||
|
$data = User::where('id', $id)->get();
|
||||||
|
return response()->json([
|
||||||
|
'status' => true,
|
||||||
|
'data' => $data[0]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*/
|
||||||
|
public function update(Request $request, string $id)
|
||||||
|
{
|
||||||
|
$data = User::where('id', $id)->update([
|
||||||
|
'name' => $request->name,
|
||||||
|
'email' => $request->email,
|
||||||
|
'role' => $request->role
|
||||||
|
]);
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'status' => true,
|
||||||
|
'msg' => 'Data berhasil di edit'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*/
|
||||||
|
public function destroy(string $id)
|
||||||
|
{
|
||||||
|
$data = User::where('id', $id)->delete();
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'status' => true,
|
||||||
|
'msg' => 'Data berhasil di hapus'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -15,7 +15,11 @@ class RoleAuth
|
||||||
*/
|
*/
|
||||||
public function handle(Request $request, Closure $next): Response
|
public function handle(Request $request, Closure $next): Response
|
||||||
{
|
{
|
||||||
if(!session('is_logged_in_admin')) {
|
if(!session('is_logged_in')) {
|
||||||
|
if(session('who_roles') == 'user') {
|
||||||
|
return redirect()->route('dashboard.index');
|
||||||
|
}
|
||||||
|
|
||||||
return redirect()->route('beranda.index');
|
return redirect()->route('beranda.index');
|
||||||
}
|
}
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
|
|
||||||
|
|
@ -37,19 +37,29 @@ public function rules(): array
|
||||||
*
|
*
|
||||||
* @throws \Illuminate\Validation\ValidationException
|
* @throws \Illuminate\Validation\ValidationException
|
||||||
*/
|
*/
|
||||||
public function authenticate(): void
|
public function authenticate()
|
||||||
{
|
{
|
||||||
$this->ensureIsNotRateLimited();
|
$this->ensureIsNotRateLimited();
|
||||||
|
|
||||||
if (! Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) {
|
if (! Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) {
|
||||||
RateLimiter::hit($this->throttleKey());
|
RateLimiter::hit($this->throttleKey());
|
||||||
|
|
||||||
|
return([
|
||||||
|
'auth_status' => false,
|
||||||
|
'msg' => 'Email atau kata sandi salah'
|
||||||
|
]);
|
||||||
|
|
||||||
throw ValidationException::withMessages([
|
throw ValidationException::withMessages([
|
||||||
'email' => trans('auth.failed'),
|
'email' => trans('auth.failed'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
RateLimiter::clear($this->throttleKey());
|
RateLimiter::clear($this->throttleKey());
|
||||||
|
|
||||||
|
return([
|
||||||
|
'auth_status' => true,
|
||||||
|
'msg' => 'Login berhasil'
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ class User extends Authenticatable
|
||||||
'name',
|
'name',
|
||||||
'email',
|
'email',
|
||||||
'password',
|
'password',
|
||||||
|
'role'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->enum('role', ['admin', 'psikolog', 'user'])->after('password');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('role');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -17,9 +17,25 @@ public function run(): void
|
||||||
{
|
{
|
||||||
// User::factory(10)->create();
|
// User::factory(10)->create();
|
||||||
|
|
||||||
|
User::factory()->create([
|
||||||
|
'name' => 'Test Admin',
|
||||||
|
'email' => 'admin@gmail.com',
|
||||||
|
'password' => password_hash('admin1234', PASSWORD_BCRYPT, ['cost' => 12]),
|
||||||
|
'role' => 'admin',
|
||||||
|
]);
|
||||||
|
|
||||||
|
User::factory()->create([
|
||||||
|
'name' => 'Test Psikolog',
|
||||||
|
'email' => 'psikolog@gmail.com',
|
||||||
|
'password' => password_hash('psikolog1234', PASSWORD_BCRYPT, ['cost' => 12]),
|
||||||
|
'role' => 'psikolog',
|
||||||
|
]);
|
||||||
|
|
||||||
User::factory()->create([
|
User::factory()->create([
|
||||||
'name' => 'Test User',
|
'name' => 'Test User',
|
||||||
'email' => 'test@example.com',
|
'email' => 'user@gmail.com',
|
||||||
|
'password' => password_hash('user1234', PASSWORD_BCRYPT, ['cost' => 12]),
|
||||||
|
'role' => 'user',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
<meta name="description" content="Mantis is made using Bootstrap 5 design framework. Download the free admin template & use it for your project.">
|
<meta name="description" content="Mantis is made using Bootstrap 5 design framework. Download the free admin template & use it for your project.">
|
||||||
<meta name="keywords" content="Mantis, Dashboard UI Kit, Bootstrap 5, Admin Template, Admin Dashboard, CRM, CMS, Bootstrap Admin Template">
|
<meta name="keywords" content="Mantis, Dashboard UI Kit, Bootstrap 5, Admin Template, Admin Dashboard, CRM, CMS, Bootstrap Admin Template">
|
||||||
<meta name="author" content="CodedThemes">
|
<meta name="author" content="CodedThemes">
|
||||||
|
<meta id="_token" value="{{ csrf_token() }}">
|
||||||
|
|
||||||
<!-- [Favicon] icon -->
|
<!-- [Favicon] icon -->
|
||||||
<link rel="icon" href="{{ asset('assets/admin/assets/images/favicon.svg') }}" type="image/x-icon"> <!-- [Google Font] Family -->
|
<link rel="icon" href="{{ asset('assets/admin/assets/images/favicon.svg') }}" type="image/x-icon"> <!-- [Google Font] Family -->
|
||||||
|
|
@ -27,6 +28,8 @@
|
||||||
<link rel="stylesheet" href="{{ asset('assets/admin/assets/css/style.css') }}" id="main-style-link" >
|
<link rel="stylesheet" href="{{ asset('assets/admin/assets/css/style.css') }}" id="main-style-link" >
|
||||||
<link rel="stylesheet" href="{{ asset('assets/admin/assets/css/style-preset.css') }}" >
|
<link rel="stylesheet" href="{{ asset('assets/admin/assets/css/style-preset.css') }}" >
|
||||||
|
|
||||||
|
<link href="https://cdn.datatables.net/2.3.7/css/dataTables.dataTables.min.css" rel="stylesheet" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<!-- [Head] end -->
|
<!-- [Head] end -->
|
||||||
<!-- [Body] Start -->
|
<!-- [Body] Start -->
|
||||||
|
|
@ -58,7 +61,7 @@
|
||||||
<!-- [ Footer ] end -->
|
<!-- [ Footer ] end -->
|
||||||
|
|
||||||
<!-- [Page Specific JS] start -->
|
<!-- [Page Specific JS] start -->
|
||||||
<script src="{{ asset('assets/admin/assets/js/plugins/apexcharts.min.js') }}"></script>
|
{{-- <script src="{{ asset('assets/admin/assets/js/plugins/apexcharts.min.js') }}"></script> --}}
|
||||||
<script src="{{ asset('assets/admin/assets/js/pages/dashboard-default.js') }}"></script>
|
<script src="{{ asset('assets/admin/assets/js/pages/dashboard-default.js') }}"></script>
|
||||||
<!-- [Page Specific JS] end -->
|
<!-- [Page Specific JS] end -->
|
||||||
<!-- Required Js -->
|
<!-- Required Js -->
|
||||||
|
|
@ -68,12 +71,20 @@
|
||||||
<script src="{{ asset('assets/admin/assets/js/fonts/custom-font.js') }}"></script>
|
<script src="{{ asset('assets/admin/assets/js/fonts/custom-font.js') }}"></script>
|
||||||
<script src="{{ asset('assets/admin/assets/js/pcoded.js') }}"></script>
|
<script src="{{ asset('assets/admin/assets/js/pcoded.js') }}"></script>
|
||||||
<script src="{{ asset('assets/admin/assets/js/plugins/feather.min.js') }}"></script>
|
<script src="{{ asset('assets/admin/assets/js/plugins/feather.min.js') }}"></script>
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||||
|
<script src="https://cdn.datatables.net/2.3.7/js/dataTables.min.js" crossorigin="anonymous"></script>
|
||||||
<script>layout_change('light');</script>
|
<script>layout_change('light');</script>
|
||||||
<script>change_box_container('false');</script>
|
<script>change_box_container('false');</script>
|
||||||
<script>layout_rtl_change('false');</script>
|
<script>layout_rtl_change('false');</script>
|
||||||
<script>preset_change("preset-1");</script>
|
<script>preset_change("preset-1");</script>
|
||||||
<script>font_change("Public-Sans");</script>
|
<script>font_change("Public-Sans");</script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(() => {
|
||||||
|
document.getElementById('logo-admin').setAttribute('src', '{{ asset('assets/admin/assets/images/logo-dark.svg') }}');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@yield('script')
|
||||||
</body>
|
</body>
|
||||||
<!-- [Body] end -->
|
<!-- [Body] end -->
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="m-header">
|
<div class="m-header">
|
||||||
<a href="{{ route('dashboard.index') }}" class="b-brand text-primary">
|
<a href="{{ route('dashboard.index') }}" class="b-brand text-primary">
|
||||||
<!-- ======== Change your logo from here ============ -->
|
<!-- ======== Change your logo from here ============ -->
|
||||||
<img src="{{ asset('assets/admin/assets/images/logo-dark.svg') }}" class="img-fluid logo-lg" alt="logo">
|
<img src="{{ asset('assets/admin/assets/images/logo-dark.svg') }}" class="img-fluid logo-lg" alt="logo" id="logo-admin">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-content">
|
<div class="navbar-content">
|
||||||
|
|
@ -16,100 +16,33 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="pc-item pc-caption">
|
<li class="pc-item pc-caption">
|
||||||
<label>UI Components</label>
|
<label>Data Master</label>
|
||||||
<i class="ti ti-dashboard"></i>
|
<i class="ti ti-dashboard"></i>
|
||||||
</li>
|
</li>
|
||||||
<li class="pc-item">
|
@if(Auth::user()->role == 'admin')
|
||||||
<a href="../elements/bc_typography.html" class="pc-link">
|
<li class="pc-item">
|
||||||
<span class="pc-micon"><i class="ti ti-typography"></i></span>
|
<a href="{{ route('users.index') }}" class="pc-link">
|
||||||
<span class="pc-mtext">Typography</span>
|
<span class="pc-micon"><i class="ti ti-users"></i></span>
|
||||||
</a>
|
<span class="pc-mtext">Data Pengguna</span>
|
||||||
</li>
|
</a>
|
||||||
<li class="pc-item">
|
</li>
|
||||||
<a href="../elements/bc_color.html" class="pc-link">
|
@endif
|
||||||
<span class="pc-micon"><i class="ti ti-color-swatch"></i></span>
|
|
||||||
<span class="pc-mtext">Color</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="pc-item">
|
|
||||||
<a href="../elements/icon-tabler.html" class="pc-link">
|
|
||||||
<span class="pc-micon"><i class="ti ti-plant-2"></i></span>
|
|
||||||
<span class="pc-mtext">Icons</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="pc-item pc-caption">
|
@if(Auth::user()->role == 'psikolog')
|
||||||
<label>Pages</label>
|
<li class="pc-item">
|
||||||
<i class="ti ti-news"></i>
|
<a href="" class="pc-link">
|
||||||
</li>
|
<span class="pc-micon"><i class="ti ti-credit-card"></i></span>
|
||||||
<li class="pc-item">
|
<span class="pc-mtext">Data Soal</span>
|
||||||
<a href="../pages/login.html" class="pc-link">
|
</a>
|
||||||
<span class="pc-micon"><i class="ti ti-lock"></i></span>
|
</li>
|
||||||
<span class="pc-mtext">Login</span>
|
<li class="pc-item">
|
||||||
</a>
|
<a href="" class="pc-link">
|
||||||
</li>
|
<span class="pc-micon"><i class="ti ti-chart-pie"></i></span>
|
||||||
<li class="pc-item">
|
<span class="pc-mtext">Data Hasil Kecemasan</span>
|
||||||
<a href="../pages/register.html" class="pc-link">
|
</a>
|
||||||
<span class="pc-micon"><i class="ti ti-user-plus"></i></span>
|
</li>
|
||||||
<span class="pc-mtext">Register</span>
|
@endif
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="pc-item pc-caption">
|
|
||||||
<label>Other</label>
|
|
||||||
<i class="ti ti-brand-chrome"></i>
|
|
||||||
</li>
|
|
||||||
<li class="pc-item pc-hasmenu">
|
|
||||||
<a href="#!" class="pc-link"><span class="pc-micon"><i class="ti ti-menu"></i></span><span class="pc-mtext">Menu
|
|
||||||
levels</span><span class="pc-arrow"><i data-feather="chevron-right"></i></span></a>
|
|
||||||
<ul class="pc-submenu">
|
|
||||||
<li class="pc-item"><a class="pc-link" href="#!">Level 2.1</a></li>
|
|
||||||
<li class="pc-item pc-hasmenu">
|
|
||||||
<a href="#!" class="pc-link">Level 2.2<span class="pc-arrow"><i data-feather="chevron-right"></i></span></a>
|
|
||||||
<ul class="pc-submenu">
|
|
||||||
<li class="pc-item"><a class="pc-link" href="#!">Level 3.1</a></li>
|
|
||||||
<li class="pc-item"><a class="pc-link" href="#!">Level 3.2</a></li>
|
|
||||||
<li class="pc-item pc-hasmenu">
|
|
||||||
<a href="#!" class="pc-link">Level 3.3<span class="pc-arrow"><i data-feather="chevron-right"></i></span></a>
|
|
||||||
<ul class="pc-submenu">
|
|
||||||
<li class="pc-item"><a class="pc-link" href="#!">Level 4.1</a></li>
|
|
||||||
<li class="pc-item"><a class="pc-link" href="#!">Level 4.2</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="pc-item pc-hasmenu">
|
|
||||||
<a href="#!" class="pc-link">Level 2.3<span class="pc-arrow"><i data-feather="chevron-right"></i></span></a>
|
|
||||||
<ul class="pc-submenu">
|
|
||||||
<li class="pc-item"><a class="pc-link" href="#!">Level 3.1</a></li>
|
|
||||||
<li class="pc-item"><a class="pc-link" href="#!">Level 3.2</a></li>
|
|
||||||
<li class="pc-item pc-hasmenu">
|
|
||||||
<a href="#!" class="pc-link">Level 3.3<span class="pc-arrow"><i data-feather="chevron-right"></i></span></a>
|
|
||||||
<ul class="pc-submenu">
|
|
||||||
<li class="pc-item"><a class="pc-link" href="#!">Level 4.1</a></li>
|
|
||||||
<li class="pc-item"><a class="pc-link" href="#!">Level 4.2</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="pc-item">
|
|
||||||
<a href="../other/sample-page.html" class="pc-link">
|
|
||||||
<span class="pc-micon"><i class="ti ti-brand-chrome"></i></span>
|
|
||||||
<span class="pc-mtext">Sample page</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<div class="card text-center">
|
|
||||||
<div class="card-body">
|
|
||||||
<img src="{{ asset('assets/admin/assets/images/img-navbar-card.png') }}" alt="images" class="img-fluid mb-2">
|
|
||||||
<h5>Upgrade To Pro</h5>
|
|
||||||
<p>To get more features and components</p>
|
|
||||||
<a href="https://codedthemes.com/item/berry-bootstrap-5-admin-template/" target="_blank"
|
|
||||||
class="btn btn-success">Buy Now</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
@extends('admin.layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<!-- [ breadcrumb ] start -->
|
||||||
|
<div class="page-header">
|
||||||
|
<div class="page-block">
|
||||||
|
<div class="row align-items-center">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="page-header-title">
|
||||||
|
<h5 class="m-b-10">Sample Page</h5>
|
||||||
|
</div>
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="../dashboard/index.html">Home</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript: void(0)">Other</a></li>
|
||||||
|
<li class="breadcrumb-item" aria-current="page">Sample Page</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- [ breadcrumb ] end -->
|
||||||
|
|
||||||
|
<!-- [ Main Content ] start -->
|
||||||
|
<div class="row">
|
||||||
|
<!-- [ sample-page ] start -->
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5>Hello card</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- [ sample-page ] end -->
|
||||||
|
</div>
|
||||||
|
<!-- [ Main Content ] end -->
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('script')
|
||||||
|
<script>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
@extends('admin.layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<!-- [ breadcrumb ] start -->
|
||||||
|
<div class="page-header">
|
||||||
|
<div class="page-block">
|
||||||
|
<div class="row align-items-center">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="page-header-title">
|
||||||
|
<h5 class="m-b-10">Sample Page</h5>
|
||||||
|
</div>
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="../dashboard/index.html">Home</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript: void(0)">Other</a></li>
|
||||||
|
<li class="breadcrumb-item" aria-current="page">Sample Page</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- [ breadcrumb ] end -->
|
||||||
|
|
||||||
|
<!-- [ Main Content ] start -->
|
||||||
|
<div class="row">
|
||||||
|
<!-- [ sample-page ] start -->
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5>Hello card</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- [ sample-page ] end -->
|
||||||
|
</div>
|
||||||
|
<!-- [ Main Content ] end -->
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('script')
|
||||||
|
<script>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,229 @@
|
||||||
|
@extends('admin.layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<!-- [ breadcrumb ] start -->
|
||||||
|
<div class="page-header">
|
||||||
|
<div class="page-block">
|
||||||
|
<div class="row align-items-center">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="page-header-title">
|
||||||
|
<h5 class="m-b-10">Data Users</h5>
|
||||||
|
</div>
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="{{ route('dashboard.index') }}">Home</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript: void(0)">Data Master</a></li>
|
||||||
|
<li class="breadcrumb-item" aria-current="page">Data Users</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- [ breadcrumb ] end -->
|
||||||
|
|
||||||
|
<!-- [ Main Content ] start -->
|
||||||
|
<div class="row">
|
||||||
|
<!-- [ sample-page ] start -->
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5>Tabel Data</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<table class="table" id="table-data">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>No</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>Email</th>
|
||||||
|
<th>Role</th>
|
||||||
|
<th>Dibuat pada</th>
|
||||||
|
<th>Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody></tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- [ sample-page ] end -->
|
||||||
|
</div>
|
||||||
|
<!-- [ Main Content ] end -->
|
||||||
|
|
||||||
|
<!-- Modal Edit -->
|
||||||
|
<div class="modal fade" id="editModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h1 class="modal-title fs-5" id="exampleModalLabel">Edit Data</h1>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 my-1">
|
||||||
|
<label for="edit_nama_user" class="form-label">Nama User</label>
|
||||||
|
<input type="text" class="form-control" id="edit_nama_user" name="edit_nama_user">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 my-1">
|
||||||
|
<label for="edit_email" class="form-label">Email</label>
|
||||||
|
<input type="text" class="form-control" id="edit_email" name="edit_email">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 my-1">
|
||||||
|
<label for="edit_role" class="form-label">Role</label>
|
||||||
|
<select class="form-select" name="edit_role" id="edit_role">
|
||||||
|
<option value="admin">Admin</option>
|
||||||
|
<option value="psikolog">Psikolog</option>
|
||||||
|
<option value="user">User</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Batal</button>
|
||||||
|
<button type="button" class="btn btn-primary" onclick="simpanEditData()">Simpan</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal Delete -->
|
||||||
|
<div class="modal fade" id="deleteModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h1 class="modal-title fs-5" id="exampleModalLabel">Hapus Data</h1>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
Apakah anda akan menghapus data user dengan nama <span id="delete_nama"></span> ini?
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Batal</button>
|
||||||
|
<button type="button" class="btn btn-danger" onclick="hapusData()">Hapus</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('script')
|
||||||
|
<script>
|
||||||
|
let table = null;
|
||||||
|
let idEdit = null;
|
||||||
|
let idHapus = null;
|
||||||
|
$(document).ready(function() {
|
||||||
|
table = new DataTable("#table-data", {
|
||||||
|
ajax: {
|
||||||
|
url: '{{ route('users.fetchData') }}',
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
data: null,
|
||||||
|
render: function(data, type, row, meta) {
|
||||||
|
return meta.row + 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
data: 'name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
data: 'email'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
data: 'role'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
data: null,
|
||||||
|
render: function(data, type, row, meta) {
|
||||||
|
return data.created_at.split('T')[0]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
data: null,
|
||||||
|
render: function(data, type, row, meta) {
|
||||||
|
return `
|
||||||
|
<div class="btn-group">
|
||||||
|
<button type="button" class="btn btn-info btn-sm rounded-circle mx-1" data-bs-toggle="modal" data-bs-target="#editModal" onclick="getDataEdit(this)" data-id="${data.id}">
|
||||||
|
<i class="ti ti-edit"></i>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-sm btn-danger delete-btn rounded-circle mx-1" data-bs-toggle="modal" data-bs-target="#deleteModal" onclick="getDataHapus(this)" data-id="${data.id}">
|
||||||
|
<i class="ti ti-trash"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
function fetchRowData() {
|
||||||
|
table.ajax.reload(null, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDataEdit(btn) {
|
||||||
|
idEdit = btn.getAttribute('data-id');
|
||||||
|
let urlEdit = '{{ route('users.edit', ['__ID__']) }}';
|
||||||
|
|
||||||
|
$.get(urlEdit.replace('__ID__', idEdit), function(data, status) {
|
||||||
|
if(data.status) {
|
||||||
|
$('#edit_nama_user').val(data.data.name);
|
||||||
|
$('#edit_email').val(data.data.email);
|
||||||
|
$('#edit_role').val(data.data.role);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDataHapus(btn) {
|
||||||
|
idHapus = btn.getAttribute('data-id');
|
||||||
|
let urlShow = '{{ route('users.show', ['__ID__']) }}';
|
||||||
|
$.get(urlShow.replace('__ID__', idHapus), function(data, status) {
|
||||||
|
if(data.status) {
|
||||||
|
$('#delete_nama').html(data.data.name);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function simpanEditData() {
|
||||||
|
if(idEdit != null) {
|
||||||
|
let urlUpdate = '{{ route('users.update', ['__ID__']) }}';
|
||||||
|
$.post(urlUpdate.replace('__ID__', idEdit), {
|
||||||
|
'_token': document.getElementById('_token').getAttribute('value'),
|
||||||
|
'_method': 'PUT',
|
||||||
|
'name': $('#edit_nama_user').val(),
|
||||||
|
'email': $('#edit_email').val(),
|
||||||
|
'role': $('#edit_role').val()
|
||||||
|
}, function(data, status) {
|
||||||
|
if(data.status) {
|
||||||
|
$('#editModal').modal('hide');
|
||||||
|
Swal.fire({
|
||||||
|
title: "Info",
|
||||||
|
text: "Data berhasil ditambahkan!",
|
||||||
|
icon: "success"
|
||||||
|
});
|
||||||
|
fetchRowData();
|
||||||
|
idEdit = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hapusData() {
|
||||||
|
if(idHapus != null) {
|
||||||
|
let urlHapus = '{{ route('users.destroy', ['__ID__']) }}';
|
||||||
|
$.post(urlHapus.replace('__ID__', idHapus), {
|
||||||
|
'_token': document.getElementById('_token').getAttribute('value'),
|
||||||
|
'_method': 'DELETE'
|
||||||
|
}, function(data, status) {
|
||||||
|
if(data.status) {
|
||||||
|
$('#deleteModal').modal('hide');
|
||||||
|
Swal.fire({
|
||||||
|
title: "Info",
|
||||||
|
text: "Data berhasil dihapus!",
|
||||||
|
icon: "success"
|
||||||
|
});
|
||||||
|
fetchRowData();
|
||||||
|
idHapus = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,480 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<!-- [Head] start -->
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Sample Page | Mantis Bootstrap 5 Admin Template</title>
|
||||||
|
<!-- [Meta] -->
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="description" content="Mantis is made using Bootstrap 5 design framework. Download the free admin template & use it for your project.">
|
||||||
|
<meta name="keywords" content="Mantis, Dashboard UI Kit, Bootstrap 5, Admin Template, Admin Dashboard, CRM, CMS, Bootstrap Admin Template">
|
||||||
|
<meta name="author" content="CodedThemes">
|
||||||
|
|
||||||
|
<!-- [Favicon] icon -->
|
||||||
|
<link rel="icon" href="../assets/images/favicon.svg" type="image/x-icon"> <!-- [Google Font] Family -->
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;400;500;600;700&display=swap" id="main-font-link">
|
||||||
|
<!-- [Tabler Icons] https://tablericons.com -->
|
||||||
|
<link rel="stylesheet" href="../assets/fonts/tabler-icons.min.css" >
|
||||||
|
<!-- [Feather Icons] https://feathericons.com -->
|
||||||
|
<link rel="stylesheet" href="../assets/fonts/feather.css" >
|
||||||
|
<!-- [Font Awesome Icons] https://fontawesome.com/icons -->
|
||||||
|
<link rel="stylesheet" href="../assets/fonts/fontawesome.css" >
|
||||||
|
<!-- [Material Icons] https://fonts.google.com/icons -->
|
||||||
|
<link rel="stylesheet" href="../assets/fonts/material.css" >
|
||||||
|
<!-- [Template CSS Files] -->
|
||||||
|
<link rel="stylesheet" href="../assets/css/style.css" id="main-style-link" >
|
||||||
|
<link rel="stylesheet" href="../assets/css/style-preset.css" >
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<!-- [Head] end -->
|
||||||
|
<!-- [Body] Start -->
|
||||||
|
|
||||||
|
<body data-pc-preset="preset-1" data-pc-direction="ltr" data-pc-theme="light">
|
||||||
|
<!-- [ Pre-loader ] start -->
|
||||||
|
<div class="loader-bg">
|
||||||
|
<div class="loader-track">
|
||||||
|
<div class="loader-fill"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- [ Pre-loader ] End -->
|
||||||
|
<!-- [ Sidebar Menu ] start -->
|
||||||
|
<nav class="pc-sidebar">
|
||||||
|
<div class="navbar-wrapper">
|
||||||
|
<div class="m-header">
|
||||||
|
<a href="../dashboard/index.html" class="b-brand text-primary">
|
||||||
|
<!-- ======== Change your logo from here ============ -->
|
||||||
|
<img src="../assets/images/logo-dark.svg" class="img-fluid logo-lg" alt="logo">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="navbar-content">
|
||||||
|
<ul class="pc-navbar">
|
||||||
|
<li class="pc-item">
|
||||||
|
<a href="../dashboard/index.html" class="pc-link">
|
||||||
|
<span class="pc-micon"><i class="ti ti-dashboard"></i></span>
|
||||||
|
<span class="pc-mtext">Dashboard</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="pc-item pc-caption">
|
||||||
|
<label>UI Components</label>
|
||||||
|
<i class="ti ti-dashboard"></i>
|
||||||
|
</li>
|
||||||
|
<li class="pc-item">
|
||||||
|
<a href="../elements/bc_typography.html" class="pc-link">
|
||||||
|
<span class="pc-micon"><i class="ti ti-typography"></i></span>
|
||||||
|
<span class="pc-mtext">Typography</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="pc-item">
|
||||||
|
<a href="../elements/bc_color.html" class="pc-link">
|
||||||
|
<span class="pc-micon"><i class="ti ti-color-swatch"></i></span>
|
||||||
|
<span class="pc-mtext">Color</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="pc-item">
|
||||||
|
<a href="../elements/icon-tabler.html" class="pc-link">
|
||||||
|
<span class="pc-micon"><i class="ti ti-plant-2"></i></span>
|
||||||
|
<span class="pc-mtext">Icons</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="pc-item pc-caption">
|
||||||
|
<label>Pages</label>
|
||||||
|
<i class="ti ti-news"></i>
|
||||||
|
</li>
|
||||||
|
<li class="pc-item">
|
||||||
|
<a href="../pages/login.html" class="pc-link">
|
||||||
|
<span class="pc-micon"><i class="ti ti-lock"></i></span>
|
||||||
|
<span class="pc-mtext">Login</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="pc-item">
|
||||||
|
<a href="../pages/register.html" class="pc-link">
|
||||||
|
<span class="pc-micon"><i class="ti ti-user-plus"></i></span>
|
||||||
|
<span class="pc-mtext">Register</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="pc-item pc-caption">
|
||||||
|
<label>Other</label>
|
||||||
|
<i class="ti ti-brand-chrome"></i>
|
||||||
|
</li>
|
||||||
|
<li class="pc-item pc-hasmenu">
|
||||||
|
<a href="#!" class="pc-link"><span class="pc-micon"><i class="ti ti-menu"></i></span><span class="pc-mtext">Menu
|
||||||
|
levels</span><span class="pc-arrow"><i data-feather="chevron-right"></i></span></a>
|
||||||
|
<ul class="pc-submenu">
|
||||||
|
<li class="pc-item"><a class="pc-link" href="#!">Level 2.1</a></li>
|
||||||
|
<li class="pc-item pc-hasmenu">
|
||||||
|
<a href="#!" class="pc-link">Level 2.2<span class="pc-arrow"><i data-feather="chevron-right"></i></span></a>
|
||||||
|
<ul class="pc-submenu">
|
||||||
|
<li class="pc-item"><a class="pc-link" href="#!">Level 3.1</a></li>
|
||||||
|
<li class="pc-item"><a class="pc-link" href="#!">Level 3.2</a></li>
|
||||||
|
<li class="pc-item pc-hasmenu">
|
||||||
|
<a href="#!" class="pc-link">Level 3.3<span class="pc-arrow"><i data-feather="chevron-right"></i></span></a>
|
||||||
|
<ul class="pc-submenu">
|
||||||
|
<li class="pc-item"><a class="pc-link" href="#!">Level 4.1</a></li>
|
||||||
|
<li class="pc-item"><a class="pc-link" href="#!">Level 4.2</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="pc-item pc-hasmenu">
|
||||||
|
<a href="#!" class="pc-link">Level 2.3<span class="pc-arrow"><i data-feather="chevron-right"></i></span></a>
|
||||||
|
<ul class="pc-submenu">
|
||||||
|
<li class="pc-item"><a class="pc-link" href="#!">Level 3.1</a></li>
|
||||||
|
<li class="pc-item"><a class="pc-link" href="#!">Level 3.2</a></li>
|
||||||
|
<li class="pc-item pc-hasmenu">
|
||||||
|
<a href="#!" class="pc-link">Level 3.3<span class="pc-arrow"><i data-feather="chevron-right"></i></span></a>
|
||||||
|
<ul class="pc-submenu">
|
||||||
|
<li class="pc-item"><a class="pc-link" href="#!">Level 4.1</a></li>
|
||||||
|
<li class="pc-item"><a class="pc-link" href="#!">Level 4.2</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="pc-item">
|
||||||
|
<a href="../other/sample-page.html" class="pc-link">
|
||||||
|
<span class="pc-micon"><i class="ti ti-brand-chrome"></i></span>
|
||||||
|
<span class="pc-mtext">Sample page</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="card text-center">
|
||||||
|
<div class="card-body">
|
||||||
|
<img src="../assets/images/img-navbar-card.png" alt="images" class="img-fluid mb-2">
|
||||||
|
<h5>Upgrade To Pro</h5>
|
||||||
|
<p>To get more features and components</p>
|
||||||
|
<a href="https://codedthemes.com/item/berry-bootstrap-5-admin-template/" target="_blank"
|
||||||
|
class="btn btn-success">Buy Now</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<!-- [ Sidebar Menu ] end --> <!-- [ Header Topbar ] start -->
|
||||||
|
<header class="pc-header">
|
||||||
|
<div class="header-wrapper"> <!-- [Mobile Media Block] start -->
|
||||||
|
<div class="me-auto pc-mob-drp">
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<!-- ======= Menu collapse Icon ===== -->
|
||||||
|
<li class="pc-h-item pc-sidebar-collapse">
|
||||||
|
<a href="#" class="pc-head-link ms-0" id="sidebar-hide">
|
||||||
|
<i class="ti ti-menu-2"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="pc-h-item pc-sidebar-popup">
|
||||||
|
<a href="#" class="pc-head-link ms-0" id="mobile-collapse">
|
||||||
|
<i class="ti ti-menu-2"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="dropdown pc-h-item d-inline-flex d-md-none">
|
||||||
|
<a
|
||||||
|
class="pc-head-link dropdown-toggle arrow-none m-0"
|
||||||
|
data-bs-toggle="dropdown"
|
||||||
|
href="#"
|
||||||
|
role="button"
|
||||||
|
aria-haspopup="false"
|
||||||
|
aria-expanded="false"
|
||||||
|
>
|
||||||
|
<i class="ti ti-search"></i>
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-menu pc-h-dropdown drp-search">
|
||||||
|
<form class="px-3">
|
||||||
|
<div class="form-group mb-0 d-flex align-items-center">
|
||||||
|
<i data-feather="search"></i>
|
||||||
|
<input type="search" class="form-control border-0 shadow-none" placeholder="Search here. . .">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="pc-h-item d-none d-md-inline-flex">
|
||||||
|
<form class="header-search">
|
||||||
|
<i data-feather="search" class="icon-search"></i>
|
||||||
|
<input type="search" class="form-control" placeholder="Search here. . .">
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- [Mobile Media Block end] -->
|
||||||
|
<div class="ms-auto">
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<li class="dropdown pc-h-item">
|
||||||
|
<a
|
||||||
|
class="pc-head-link dropdown-toggle arrow-none me-0"
|
||||||
|
data-bs-toggle="dropdown"
|
||||||
|
href="#"
|
||||||
|
role="button"
|
||||||
|
aria-haspopup="false"
|
||||||
|
aria-expanded="false"
|
||||||
|
>
|
||||||
|
<i class="ti ti-mail"></i>
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-menu dropdown-notification dropdown-menu-end pc-h-dropdown">
|
||||||
|
<div class="dropdown-header d-flex align-items-center justify-content-between">
|
||||||
|
<h5 class="m-0">Message</h5>
|
||||||
|
<a href="#!" class="pc-head-link bg-transparent"><i class="ti ti-x text-danger"></i></a>
|
||||||
|
</div>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<div class="dropdown-header px-0 text-wrap header-notification-scroll position-relative" style="max-height: calc(100vh - 215px)">
|
||||||
|
<div class="list-group list-group-flush w-100">
|
||||||
|
<a class="list-group-item list-group-item-action">
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="flex-shrink-0">
|
||||||
|
<img src="../assets/images/user/avatar-2.jpg" alt="user-image" class="user-avtar">
|
||||||
|
</div>
|
||||||
|
<div class="flex-grow-1 ms-1">
|
||||||
|
<span class="float-end text-muted">3:00 AM</span>
|
||||||
|
<p class="text-body mb-1">It's <b>Cristina danny's</b> birthday today.</p>
|
||||||
|
<span class="text-muted">2 min ago</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a class="list-group-item list-group-item-action">
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="flex-shrink-0">
|
||||||
|
<img src="../assets/images/user/avatar-1.jpg" alt="user-image" class="user-avtar">
|
||||||
|
</div>
|
||||||
|
<div class="flex-grow-1 ms-1">
|
||||||
|
<span class="float-end text-muted">6:00 PM</span>
|
||||||
|
<p class="text-body mb-1"><b>Aida Burg</b> commented your post.</p>
|
||||||
|
<span class="text-muted">5 August</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a class="list-group-item list-group-item-action">
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="flex-shrink-0">
|
||||||
|
<img src="../assets/images/user/avatar-3.jpg" alt="user-image" class="user-avtar">
|
||||||
|
</div>
|
||||||
|
<div class="flex-grow-1 ms-1">
|
||||||
|
<span class="float-end text-muted">2:45 PM</span>
|
||||||
|
<p class="text-body mb-1"><b>There was a failure to your setup.</b></p>
|
||||||
|
<span class="text-muted">7 hours ago</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a class="list-group-item list-group-item-action">
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="flex-shrink-0">
|
||||||
|
<img src="../assets/images/user/avatar-4.jpg" alt="user-image" class="user-avtar">
|
||||||
|
</div>
|
||||||
|
<div class="flex-grow-1 ms-1">
|
||||||
|
<span class="float-end text-muted">9:10 PM</span>
|
||||||
|
<p class="text-body mb-1"><b>Cristina Danny </b> invited to join <b> Meeting.</b></p>
|
||||||
|
<span class="text-muted">Daily scrum meeting time</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<div class="text-center py-2">
|
||||||
|
<a href="#!" class="link-primary">View all</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="dropdown pc-h-item header-user-profile">
|
||||||
|
<a
|
||||||
|
class="pc-head-link dropdown-toggle arrow-none me-0"
|
||||||
|
data-bs-toggle="dropdown"
|
||||||
|
href="#"
|
||||||
|
role="button"
|
||||||
|
aria-haspopup="false"
|
||||||
|
data-bs-auto-close="outside"
|
||||||
|
aria-expanded="false"
|
||||||
|
>
|
||||||
|
<img src="../assets/images/user/avatar-2.jpg" alt="user-image" class="user-avtar">
|
||||||
|
<span>Stebin Ben</span>
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-menu dropdown-user-profile dropdown-menu-end pc-h-dropdown">
|
||||||
|
<div class="dropdown-header">
|
||||||
|
<div class="d-flex mb-1">
|
||||||
|
<div class="flex-shrink-0">
|
||||||
|
<img src="../assets/images/user/avatar-2.jpg" alt="user-image" class="user-avtar wid-35">
|
||||||
|
</div>
|
||||||
|
<div class="flex-grow-1 ms-3">
|
||||||
|
<h6 class="mb-1">Stebin Ben</h6>
|
||||||
|
<span>UI/UX Designer</span>
|
||||||
|
</div>
|
||||||
|
<a href="#!" class="pc-head-link bg-transparent"><i class="ti ti-power text-danger"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul class="nav drp-tabs nav-fill nav-tabs" id="mydrpTab" role="tablist">
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button
|
||||||
|
class="nav-link active"
|
||||||
|
id="drp-t1"
|
||||||
|
data-bs-toggle="tab"
|
||||||
|
data-bs-target="#drp-tab-1"
|
||||||
|
type="button"
|
||||||
|
role="tab"
|
||||||
|
aria-controls="drp-tab-1"
|
||||||
|
aria-selected="true"
|
||||||
|
><i class="ti ti-user"></i> Profile</button
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button
|
||||||
|
class="nav-link"
|
||||||
|
id="drp-t2"
|
||||||
|
data-bs-toggle="tab"
|
||||||
|
data-bs-target="#drp-tab-2"
|
||||||
|
type="button"
|
||||||
|
role="tab"
|
||||||
|
aria-controls="drp-tab-2"
|
||||||
|
aria-selected="false"
|
||||||
|
><i class="ti ti-settings"></i> Setting</button
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="tab-content" id="mysrpTabContent">
|
||||||
|
<div class="tab-pane fade show active" id="drp-tab-1" role="tabpanel" aria-labelledby="drp-t1" tabindex="0">
|
||||||
|
<a href="#!" class="dropdown-item">
|
||||||
|
<i class="ti ti-edit-circle"></i>
|
||||||
|
<span>Edit Profile</span>
|
||||||
|
</a>
|
||||||
|
<a href="#!" class="dropdown-item">
|
||||||
|
<i class="ti ti-user"></i>
|
||||||
|
<span>View Profile</span>
|
||||||
|
</a>
|
||||||
|
<a href="#!" class="dropdown-item">
|
||||||
|
<i class="ti ti-clipboard-list"></i>
|
||||||
|
<span>Social Profile</span>
|
||||||
|
</a>
|
||||||
|
<a href="#!" class="dropdown-item">
|
||||||
|
<i class="ti ti-wallet"></i>
|
||||||
|
<span>Billing</span>
|
||||||
|
</a>
|
||||||
|
<a href="#!" class="dropdown-item">
|
||||||
|
<i class="ti ti-power"></i>
|
||||||
|
<span>Logout</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade" id="drp-tab-2" role="tabpanel" aria-labelledby="drp-t2" tabindex="0">
|
||||||
|
<a href="#!" class="dropdown-item">
|
||||||
|
<i class="ti ti-help"></i>
|
||||||
|
<span>Support</span>
|
||||||
|
</a>
|
||||||
|
<a href="#!" class="dropdown-item">
|
||||||
|
<i class="ti ti-user"></i>
|
||||||
|
<span>Account Settings</span>
|
||||||
|
</a>
|
||||||
|
<a href="#!" class="dropdown-item">
|
||||||
|
<i class="ti ti-lock"></i>
|
||||||
|
<span>Privacy Center</span>
|
||||||
|
</a>
|
||||||
|
<a href="#!" class="dropdown-item">
|
||||||
|
<i class="ti ti-messages"></i>
|
||||||
|
<span>Feedback</span>
|
||||||
|
</a>
|
||||||
|
<a href="#!" class="dropdown-item">
|
||||||
|
<i class="ti ti-list"></i>
|
||||||
|
<span>History</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<!-- [ Header ] end -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- [ Main Content ] start -->
|
||||||
|
<div class="pc-container">
|
||||||
|
<div class="pc-content">
|
||||||
|
<!-- [ breadcrumb ] start -->
|
||||||
|
<div class="page-header">
|
||||||
|
<div class="page-block">
|
||||||
|
<div class="row align-items-center">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="page-header-title">
|
||||||
|
<h5 class="m-b-10">Sample Page</h5>
|
||||||
|
</div>
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="../dashboard/index.html">Home</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript: void(0)">Other</a></li>
|
||||||
|
<li class="breadcrumb-item" aria-current="page">Sample Page</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- [ breadcrumb ] end -->
|
||||||
|
|
||||||
|
<!-- [ Main Content ] start -->
|
||||||
|
<div class="row">
|
||||||
|
<!-- [ sample-page ] start -->
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5>Hello card</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- [ sample-page ] end -->
|
||||||
|
</div>
|
||||||
|
<!-- [ Main Content ] end -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- [ Main Content ] end -->
|
||||||
|
<footer class="pc-footer">
|
||||||
|
<div class="footer-wrapper container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm my-1">
|
||||||
|
<p class="m-0"
|
||||||
|
>Mantis ♥ crafted by Team <a href="https://themeforest.net/user/codedthemes" target="_blank">Codedthemes</a> Distributed by <a href="https://themewagon.com/">ThemeWagon</a>.</p
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto my-1">
|
||||||
|
<ul class="list-inline footer-link mb-0">
|
||||||
|
<li class="list-inline-item"><a href="../index.html">Home</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer> <!-- Required Js -->
|
||||||
|
<script src="../assets/js/plugins/popper.min.js"></script>
|
||||||
|
<script src="../assets/js/plugins/simplebar.min.js"></script>
|
||||||
|
<script src="../assets/js/plugins/bootstrap.min.js"></script>
|
||||||
|
<script src="../assets/js/fonts/custom-font.js"></script>
|
||||||
|
<script src="../assets/js/pcoded.js"></script>
|
||||||
|
<script src="../assets/js/plugins/feather.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>layout_change('light');</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>change_box_container('false');</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>layout_rtl_change('false');</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>preset_change("preset-1");</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>font_change("Public-Sans");</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
<!-- [Body] end -->
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
use App\Http\Controllers\DashboardController;
|
use App\Http\Controllers\DashboardController;
|
||||||
use App\Http\Controllers\LandingController;
|
use App\Http\Controllers\LandingController;
|
||||||
use App\Http\Controllers\ProfileController;
|
use App\Http\Controllers\ProfileController;
|
||||||
|
use App\Http\Controllers\UsersController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
|
|
@ -22,6 +23,8 @@
|
||||||
Route::resource('beranda', LandingController::class);
|
Route::resource('beranda', LandingController::class);
|
||||||
Route::middleware(['auth', 'role.auth'])->group(function() {
|
Route::middleware(['auth', 'role.auth'])->group(function() {
|
||||||
Route::resource('dashboard', DashboardController::class);
|
Route::resource('dashboard', DashboardController::class);
|
||||||
|
Route::resource('users', UsersController::class);
|
||||||
|
Route::get('users/fetch/data', [UsersController::class, 'getData'])->name('users.fetchData');
|
||||||
});
|
});
|
||||||
|
|
||||||
require __DIR__.'/auth.php';
|
require __DIR__.'/auth.php';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue