Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sipeka
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siti Aisah
sipeka
Commits
de953028
Commit
de953028
authored
May 17, 2024
by
Siti Aisah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update dashboard
parent
f11113ea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
9 deletions
+68
-9
app/Http/Controllers/Admin/DashboardController.php
+32
-0
resources/views/dashboard.blade.php
+34
-6
routes/web.php
+2
-3
No files found.
app/Http/Controllers/Admin/DashboardController.php
0 → 100644
View file @
de953028
<?php
namespace
App\Http\Controllers\Admin
;
use
App\Http\Support\ValidationRule
;
use
App\Http\Controllers\Controller
;
use
App\Models\Admin\Pengajuan
;
use
Exception
;
use
Storage
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\Log
;
use
Illuminate\Support\Facades\Redirect
;
class
DashboardController
extends
Controller
{
public
function
index
()
{
$data
[
'jumlah'
]
=
DB
::
table
(
"tr_pengajuan"
)
->
select
(
"id_kategori"
,
DB
::
raw
(
"count (id_kategori) as jumlah"
))
->
groupBy
(
"id_kategori"
)
->
pluck
(
'jumlah'
,
'id_kategori'
);
$semua
=
DB
::
table
(
'bantuan_pengusul'
)
->
count
();
$sudah
=
DB
::
table
(
'tr_pengajuan'
)
->
count
();
$data
[
'sudah'
]
=
$sudah
;
$data
[
'belum'
]
=
$semua
-
$sudah
;
return
view
(
'dashboard'
,
$data
);
}
}
resources/views/dashboard.blade.php
View file @
de953028
...
@@ -48,7 +48,14 @@
...
@@ -48,7 +48,14 @@
</div>
</div>
</div>
</div>
<div class="
my
-
auto
">
<div class="
my
-
auto
">
<h4 class="
fw
-
bolder
mb
-
0
">4</h4>
@php
if(isset(
$jumlah['c6c43201-3f60-43af-968a-75c2984624e7']
)){
$jsarjana
=
$jumlah['c6c43201-3f60-43af-968a-75c2984624e7']
;
} else {
$jsarjana
= 0;
}
@endphp
<h4 class="
fw
-
bolder
mb
-
0
">{{
$jsarjana
}}</h4>
<p class="
card
-
text
font
-
small
-
3
mb
-
0
">Mhs S1/D4</p>
<p class="
card
-
text
font
-
small
-
3
mb
-
0
">Mhs S1/D4</p>
</div>
</div>
</div>
</div>
...
@@ -61,7 +68,14 @@
...
@@ -61,7 +68,14 @@
</div>
</div>
</div>
</div>
<div class="
my
-
auto
">
<div class="
my
-
auto
">
<h4 class="
fw
-
bolder
mb
-
0
">1</h4>
@php
if(isset(
$jumlah['11459605-89b4-4dfc-9586-519802e989e4']
)){
$jpasca
=
$jumlah['11459605-89b4-4dfc-9586-519802e989e4']
;
} else {
$jpasca
= 0;
}
@endphp
<h4 class="
fw
-
bolder
mb
-
0
">{{
$jpasca
}}</h4>
<p class="
card
-
text
font
-
small
-
3
mb
-
0
">Mhs S2/S3</p>
<p class="
card
-
text
font
-
small
-
3
mb
-
0
">Mhs S2/S3</p>
</div>
</div>
</div>
</div>
...
@@ -74,7 +88,14 @@
...
@@ -74,7 +88,14 @@
</div>
</div>
</div>
</div>
<div class="
my
-
auto
">
<div class="
my
-
auto
">
<h4 class="
fw
-
bolder
mb
-
0
">2</h4>
@php
if(isset(
$jumlah['ec949871-68fa-4357-8084-547db716faf6']
)){
$jdosen
=
$jumlah['ec949871-68fa-4357-8084-547db716faf6']
;
} else {
$jdosen
= 0;
}
@endphp
<h4 class="
fw
-
bolder
mb
-
0
">{{
$jdosen
}}</h4>
<p class="
card
-
text
font
-
small
-
3
mb
-
0
">Dosen</p>
<p class="
card
-
text
font
-
small
-
3
mb
-
0
">Dosen</p>
</div>
</div>
</div>
</div>
...
@@ -87,7 +108,14 @@
...
@@ -87,7 +108,14 @@
</div>
</div>
</div>
</div>
<div class="
my
-
auto
">
<div class="
my
-
auto
">
<h4 class="
fw
-
bolder
mb
-
0
">3</h4>
@php
if(isset(
$jumlah['790fdbb1-36e7-447c-9a38-55b62816395c']
)){
$jindustri
=
$jumlah['790fdbb1-36e7-447c-9a38-55b62816395c']
;
} else {
$jindustri
= 0;
}
@endphp
<h4 class="
fw
-
bolder
mb
-
0
">{{
$jindustri
}}</h4>
<p class="
card
-
text
font
-
small
-
3
mb
-
0
">Industri</p>
<p class="
card
-
text
font
-
small
-
3
mb
-
0
">Industri</p>
</div>
</div>
</div>
</div>
...
@@ -107,7 +135,7 @@
...
@@ -107,7 +135,7 @@
</div>
</div>
</div>
</div>
<div class="
my
-
auto
">
<div class="
my
-
auto
">
<h4 class="
fw
-
bolder
mb
-
0
">
20
</h4>
<h4 class="
fw
-
bolder
mb
-
0
">
{{
$sudah
}}
</h4>
<p class="
card
-
text
font
-
small
-
3
mb
-
0
">Sudah dikategorikan</p>
<p class="
card
-
text
font
-
small
-
3
mb
-
0
">Sudah dikategorikan</p>
</div>
</div>
</div>
</div>
...
@@ -120,7 +148,7 @@
...
@@ -120,7 +148,7 @@
</div>
</div>
</div>
</div>
<div class="
my
-
auto
">
<div class="
my
-
auto
">
<h4 class="
fw
-
bolder
mb
-
0
">
10
</h4>
<h4 class="
fw
-
bolder
mb
-
0
">
{{
$belum
}}
</h4>
<p class="
card
-
text
font
-
small
-
3
mb
-
0
">Belum dikategorikan</p>
<p class="
card
-
text
font
-
small
-
3
mb
-
0
">Belum dikategorikan</p>
</div>
</div>
</div>
</div>
...
...
routes/web.php
View file @
de953028
<?php
<?php
use
App\Http\Controllers\Admin\Auth\LoginController
;
use
App\Http\Controllers\Admin\Auth\LoginController
;
use
App\Http\Controllers\Admin\DashboardController
;
use
App\Http\Controllers\Admin\KategoriController
;
use
App\Http\Controllers\Admin\KategoriController
;
use
App\Http\Controllers\Admin\TransaksiController
;
use
App\Http\Controllers\Admin\TransaksiController
;
use
App\Http\Controllers\Admin\SakuController
;
use
App\Http\Controllers\Admin\SakuController
;
...
@@ -25,9 +26,7 @@
...
@@ -25,9 +26,7 @@
// Route::get('/home', [TransaksiController::class, 'index'])->name('admin.index-transaksi');
// Route::get('/home', [TransaksiController::class, 'index'])->name('admin.index-transaksi');
Route
::
middleware
([
'auth'
,
'prevent-back-history'
])
->
group
(
function
(){
Route
::
middleware
([
'auth'
,
'prevent-back-history'
])
->
group
(
function
(){
Route
::
get
(
'/home'
,
function
()
{
Route
::
get
(
'/home'
,
[
DashboardController
::
class
,
'index'
]);
return
view
(
'dashboard'
);
});
Route
::
resource
(
'kategori'
,
KategoriController
::
class
);
Route
::
resource
(
'kategori'
,
KategoriController
::
class
);
Route
::
resource
(
'transaksi'
,
TransaksiController
::
class
);
Route
::
resource
(
'transaksi'
,
TransaksiController
::
class
);
Route
::
resource
(
'saku'
,
SakuController
::
class
);
Route
::
resource
(
'saku'
,
SakuController
::
class
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment