fix komen kak aida
This commit is contained in:
@@ -21,6 +21,20 @@ class HomeController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return view('includes.home');
|
$harga_emas = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/harga_emas/')->json();
|
||||||
|
|
||||||
|
$hargaemasterdahulu = array();
|
||||||
|
|
||||||
|
foreach($harga_emas as $index=>$harga)
|
||||||
|
{
|
||||||
|
$hargaemassandaran = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/harga_emas/rekod/sandaran',['karat' => $harga['karat']])->json();
|
||||||
|
|
||||||
|
$percentnaik = (floatval($harga['harga']) - floatval($hargaemassandaran[1]['harga'])) / ($hargaemassandaran[1]['harga']) * 100;
|
||||||
|
|
||||||
|
array_push($hargaemasterdahulu,['karat' => $harga['karat'],'hargasemasa' => $harga['harga'], 'hargadahulu' => $hargaemassandaran[1]['harga'],'percent' => $percentnaik]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('includes.home',compact('hargaemasterdahulu'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -214,62 +214,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="col-xl-6 col-md-12">
|
|
||||||
<div class="card card-bg shadow p-4">
|
|
||||||
<div class="card-header border-0">
|
|
||||||
<div class="row align-items-center">
|
|
||||||
<div class="col">
|
|
||||||
<h4 class="mb-0 text-primary">Harga Emas</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="table-responsive">
|
|
||||||
<!-- Projects table -->
|
|
||||||
<table class="table align-items-center table-bordered table-hover border" id="harga_emas" style="text-align: center; width: 100%">
|
|
||||||
<thead class="thead-dark bg-dark text-white text-center">
|
|
||||||
<tr>
|
|
||||||
<th>Karat</th>
|
|
||||||
<th>Harga (RM)</th>
|
|
||||||
<th>Perubahan (%)</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
@foreach($hargaemasterdahulu as $index=>$hm)
|
|
||||||
<tr>
|
|
||||||
<td>{{ $hm['karat'] }}</td>
|
|
||||||
<td>{{ $hm['hargasemasa'] }}</td>
|
|
||||||
@if($hm['percent'] > 0)
|
|
||||||
<td><i class="fas fa-arrow-up text-success mr-3"></i><span class="text-success">({{ number_format($hm['percent'],2) }})</span></td>
|
|
||||||
@else
|
|
||||||
<td><i class="fas fa-arrow-down text-warning mr-3"></i><span class="text-warning">({{ number_format($hm['percent']*-1,2) }})</span></td>
|
|
||||||
@endif
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
<!-- <tr>
|
|
||||||
<td>14.0k</td>
|
|
||||||
<td>157.30</td>
|
|
||||||
<td><i class="fas fa-arrow-up text-success mr-3"></i><span class="text-success">0.47</span></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>14.0k</td>
|
|
||||||
<td>157.30</td>
|
|
||||||
<td><i class="fas fa-arrow-up text-success mr-3"></i><span class="text-success">0.47</span></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>14.0k</td>
|
|
||||||
<td>157.30</td>
|
|
||||||
<td><i class="fas fa-arrow-up text-success mr-3"></i><span class="text-success">0.47</span></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>14.0k</td>
|
|
||||||
<td>157.30</td>
|
|
||||||
<td><i class="fas fa-arrow-up text-success mr-3"></i><span class="text-success">0.47</span></td>
|
|
||||||
</tr> -->
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -69,10 +69,7 @@
|
|||||||
<th>#</th>
|
<th>#</th>
|
||||||
<th>Ar-Rahn</th>
|
<th>Ar-Rahn</th>
|
||||||
<th>No Rujukan</th>
|
<th>No Rujukan</th>
|
||||||
<th>Pembiayaan Asal</th>
|
|
||||||
<th>Baki Pembiayaan</th>
|
|
||||||
<th>Keuntungan Semasa</th>
|
<th>Keuntungan Semasa</th>
|
||||||
<th>Status</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="list">
|
<tbody class="list">
|
||||||
@@ -121,24 +118,18 @@
|
|||||||
@php
|
@php
|
||||||
$marhun = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/marhun/' . $bt['norujukan'] )->json();
|
$marhun = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/marhun/' . $bt['norujukan'] )->json();
|
||||||
@endphp
|
@endphp
|
||||||
<a href="#" class="linktarget" data-toggle="modal" data-marhun="{{ json_encode($marhun) }}" data-pinjaman="{{$bt['pinjaman']}}" data-norujukan="{{$bt['norujukan']}}" data-hargajualan="{{$bt['hargajualan']}}" data-kodcaw="{{ $bt['kodcaw'] }}" data-target="#marhunModal"><span class="name mb-0 text-sm">{{ $bt['norujukan'] }}</span></a>
|
<a href="#" class="linktarget" data-toggle="modal" data-pjmnum="{{ number_format($bt['pinjaman'],2) }}" data-bakipjm="{{ number_format($bt['bakipjm'],2) }}" data-lelong="{{ $bt['taglel'] }}" data-marhun="{{ json_encode($marhun) }}" data-pinjaman="{{$bt['pinjaman']}}" data-norujukan="{{$bt['norujukan']}}" data-hargajualan="{{$bt['hargajualan']}}" data-kodcaw="{{ $bt['kodcaw'] }}" data-target="#marhunModal"><span class="name mb-0 text-sm">{{ $bt['norujukan'] }}</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<td>
|
|
||||||
{{ number_format($bt['pinjaman'],2) }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ number_format($bt['bakipjm'],2) }}
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
{{ is_numeric($koskeuntungan) ? number_format($koskeuntungan,2) : $koskeuntungan }}
|
{{ is_numeric($koskeuntungan) ? number_format($koskeuntungan,2) : $koskeuntungan }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
{{-- <td>
|
||||||
@if($bt['taglel'] === 1)
|
@if($bt['taglel'] === 1)
|
||||||
<span class="badge alert-danger">Akan Dilelong</span>
|
<span class="badge alert-danger">Akan Dilelong</span>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td> --}}
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -217,6 +208,21 @@
|
|||||||
var kodcaw = $(this).data('kodcaw');
|
var kodcaw = $(this).data('kodcaw');
|
||||||
var hargajualan = $(this).data('hargajualan');
|
var hargajualan = $(this).data('hargajualan');
|
||||||
var pinjaman = $(this).data('pinjaman');
|
var pinjaman = $(this).data('pinjaman');
|
||||||
|
var bakipjm = $(this).data('bakipjm');
|
||||||
|
var lelong = $(this).data('lelong');
|
||||||
|
var pjmnum = $(this).data('pjmnum');
|
||||||
|
|
||||||
|
$('#pemb').text('RM ' + pjmnum);
|
||||||
|
$('#bpemb').text('RM ' + bakipjm);
|
||||||
|
|
||||||
|
if(lelong === 1)
|
||||||
|
{
|
||||||
|
$('#statuslelong').text('Akan Dilelong');
|
||||||
|
}else{
|
||||||
|
$('#statuslelong').text('-');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#norujukan_modal').val(norujukan);
|
$('#norujukan_modal').val(norujukan);
|
||||||
$('#pinjaman_modal').val(pinjaman);
|
$('#pinjaman_modal').val(pinjaman);
|
||||||
|
|||||||
@@ -101,13 +101,86 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-body text-center">
|
<div class="card-body text-center">
|
||||||
<h5 class="font-weight-normal">
|
<h5 class="font-weight-normal">
|
||||||
<a>Gold</a>
|
<a>PitihEmas</a>
|
||||||
</h5>
|
</h5>
|
||||||
<button type="button" class="btn bg-gradient-primary btn-sm mb-0 mt-3" disabled>Enter</button>
|
<button type="button" class="btn bg-gradient-primary btn-sm mb-0 mt-3" disabled>Enter</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-4 col-md-6">
|
||||||
|
<div class="card mt-3 card-bg shadow p-4">
|
||||||
|
{{-- <div class="card-header border-0">
|
||||||
|
<div class="row align-items-center">
|
||||||
|
<div class="col">
|
||||||
|
<h4 class="mb-0 text-primary">Harga Emas</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> --}}
|
||||||
|
<div class="table-responsive">
|
||||||
|
<!-- Projects table -->
|
||||||
|
<table class="table align-items-center table-bordered table-hover border" id="harga_emas" style="text-align: center; width: 100%">
|
||||||
|
<thead class="thead-dark bg-dark text-white text-center">
|
||||||
|
<tr>
|
||||||
|
<th>Karat</th>
|
||||||
|
<th>Harga (RM)</th>
|
||||||
|
<th>Perubahan (%)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($hargaemasterdahulu as $index=>$hm)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $hm['karat'] }}</td>
|
||||||
|
<td>{{ $hm['hargasemasa'] }}</td>
|
||||||
|
@if($hm['percent'] > 0)
|
||||||
|
<td><i class="fas fa-arrow-up text-success mr-3"></i><span class="text-success">({{ number_format($hm['percent'],2) }})</span></td>
|
||||||
|
@else
|
||||||
|
<td><i class="fas fa-arrow-down text-warning mr-3"></i><span class="text-warning">({{ number_format($hm['percent']*-1,2) }})</span></td>
|
||||||
|
@endif
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
<!-- <tr>
|
||||||
|
<td>14.0k</td>
|
||||||
|
<td>157.30</td>
|
||||||
|
<td><i class="fas fa-arrow-up text-success mr-3"></i><span class="text-success">0.47</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>14.0k</td>
|
||||||
|
<td>157.30</td>
|
||||||
|
<td><i class="fas fa-arrow-up text-success mr-3"></i><span class="text-success">0.47</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>14.0k</td>
|
||||||
|
<td>157.30</td>
|
||||||
|
<td><i class="fas fa-arrow-up text-success mr-3"></i><span class="text-success">0.47</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>14.0k</td>
|
||||||
|
<td>157.30</td>
|
||||||
|
<td><i class="fas fa-arrow-up text-success mr-3"></i><span class="text-success">0.47</span></td>
|
||||||
|
</tr> -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
var hargaemastable = $('#harga_emas').DataTable({
|
||||||
|
"bLengthChange": false,
|
||||||
|
"bFilter": false,
|
||||||
|
language: {
|
||||||
|
'paginate': {
|
||||||
|
'previous': '<span class="fas fa-backward"></span>',
|
||||||
|
'next': '<span class="fas fa-forward"></span>'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scrollX": true,
|
||||||
|
"pageLength": 5
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
<!-- <script>
|
<!-- <script>
|
||||||
$(function() {
|
$(function() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
<nav class="navbar navbar-expand-lg blur border-radius-xl top-0 z-index-fixed shadow position-absolute my-3 py-2 start-0 end-0 mx-4">
|
<nav class="navbar navbar-expand-lg blur border-radius-xl top-0 z-index-fixed shadow position-absolute my-3 py-2 start-0 end-0 mx-4">
|
||||||
<div class="container-fluid px-0">
|
<div class="container-fluid px-0">
|
||||||
<a class="navbar-brand font-weight-bolder ms-sm-3" href="/" rel="tooltip" title="e-Rahn" data-placement="bottom">
|
<a class="navbar-brand font-weight-bolder ms-sm-3" href="/" rel="tooltip" title="e-Rahn" data-placement="bottom">
|
||||||
CUSTOMER PORTAL
|
PORTAL PELANGGAN
|
||||||
</a>
|
</a>
|
||||||
<button class="navbar-toggler shadow-none ms-2" type="button" data-bs-toggle="collapse" data-bs-target="#navigation" aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler shadow-none ms-2" type="button" data-bs-toggle="collapse" data-bs-target="#navigation" aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon mt-2">
|
<span class="navbar-toggler-icon mt-2">
|
||||||
|
|||||||
@@ -94,12 +94,7 @@
|
|||||||
<thead class="thead-light bg-dark text-white text-center">
|
<thead class="thead-light bg-dark text-white text-center">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" class="sort" data-sort="name">No Rujukan</th>
|
<th scope="col" class="sort" data-sort="name">No Rujukan</th>
|
||||||
<th scope="col" class="sort" data-sort="budget">Pembiayaan Asal</th>
|
|
||||||
<th scope="col" class="sort" data-sort="status">Baki Pembiayaan</th>
|
|
||||||
<th scope="col" class="sort" data-sort="budget">Keuntungan</th>
|
<th scope="col" class="sort" data-sort="budget">Keuntungan</th>
|
||||||
<th scope="col" class="sort" data-sort="budget">N. Marhun</th>
|
|
||||||
<th scope="col" class="sort" data-sort="budget">Berat(gm)</th>
|
|
||||||
<th scope="col" class="sort" data-sort="budget">Kos Keuntungan (12 Bulan)</th>
|
|
||||||
<th scope="col" class="sort" data-sort="budget">JBG</th>
|
<th scope="col" class="sort" data-sort="budget">JBG</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -110,29 +105,14 @@
|
|||||||
<th scope="row">
|
<th scope="row">
|
||||||
<div class="media align-items-center">
|
<div class="media align-items-center">
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<a href="#" onclick="bayaranfunc(this)" class="linktarget" data-toggle="modal" data-target="#historybayaranModal" data-norujukan="{{ $bt['norujukan'] }}" data-url="">{{ $bt['norujukan'] }}</a>
|
<a href="#" onclick="bayaranfunc(this)" data-pinjaman="{{ number_format($bt['pinjaman'],2) }}" data-upah12="{{ number_format($bt['upah12'],2) }}" data-bakipjm="{{ number_format($bt['bakipjm'],2) }}" data-berat="{{ $bt['berat'] }}" data-nm="{{ number_format($bt['nilaimarhun'],2) }}" class="linktarget" data-toggle="modal" data-target="#historybayaranModal" data-norujukan="{{ $bt['norujukan'] }}" data-url="">{{ $bt['norujukan'] }}</a>
|
||||||
{{-- <a href="{{ route('penyata.summary',['kodcaw' => $bt['kodcaw'], 'norujukan' => $bt['norujukan']]) }}" target="_blank"><span class="name mb-0 text-sm">{{ $bt['norujukan'] }}</span></a> --}}
|
{{-- <a href="{{ route('penyata.summary',['kodcaw' => $bt['kodcaw'], 'norujukan' => $bt['norujukan']]) }}" target="_blank"><span class="name mb-0 text-sm">{{ $bt['norujukan'] }}</span></a> --}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<td>
|
|
||||||
{{ number_format($bt['pinjaman'],2) }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ number_format($bt['bakipjm'],2) }}
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
{{ number_format($bt['bakiupah'],2) }}
|
{{ number_format($bt['bakiupah'],2) }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
{{ number_format($bt['nilaimarhun'],2) }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ number_format($bt['berat'],2) }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ number_format($bt['upah12'],2) }}
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
{{ number_format($bt['tempoh'],2) }}
|
{{ number_format($bt['tempoh'],2) }}
|
||||||
</td>
|
</td>
|
||||||
@@ -248,6 +228,22 @@
|
|||||||
function bayaranfunc(e){
|
function bayaranfunc(e){
|
||||||
let norujukan = $(e).data('norujukan');
|
let norujukan = $(e).data('norujukan');
|
||||||
|
|
||||||
|
let pinjaman = $(e).data('pinjaman');
|
||||||
|
let upah12 = $(e).data('upah12');
|
||||||
|
let bakipjm = $(e).data('bakipjm');
|
||||||
|
let berat = $(e).data('berat');
|
||||||
|
let nm = $(e).data('nm');
|
||||||
|
|
||||||
|
console.log(pinjaman,upah12,bakipjm,berat,nm);
|
||||||
|
|
||||||
|
$('#pembiayaan').text('RM ' + pinjaman);
|
||||||
|
$('#bpemb').text('RM ' + bakipjm);
|
||||||
|
$('#nm').text('RM ' + nm);
|
||||||
|
$('#berat').text(berat + 'g');
|
||||||
|
$('#koskeun').text('RM ' + upah12);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: endpoint + '/api/transaction/' + norujukan,
|
url: endpoint + '/api/transaction/' + norujukan,
|
||||||
|
|||||||
@@ -43,6 +43,29 @@
|
|||||||
|
|
||||||
<!-- Modal body -->
|
<!-- Modal body -->
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="p-2 rounded bg-warning text-center text-dark mb-2"><div class="inner"><b>Pembiayaan: <span id="pembiayaan"></span></b></div></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="p-2 rounded bg-warning text-center text-dark mb-2"><div class="inner"><b>B. Pembiayaan: <span id="bpemb"></span></b></div></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="p-2 rounded bg-warning text-center text-dark mb-2"><div class="inner"><b>N. Marhun: <span id="nm"></span></b></div></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="p-2 rounded bg-warning text-center text-dark mb-2"><div class="inner"><b>Berat: <span id="berat"></span></b></div></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="p-2 rounded bg-warning text-center text-dark mb-2"><div class="inner"><b>Kos Keuntungan (12 Bulan): <span id="koskeun"></span></b></div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="overflow-x: auto;">
|
<div style="overflow-x: auto;">
|
||||||
<table id="tablehistorybayaran" class="table table-striped table-bordered text-center">
|
<table id="tablehistorybayaran" class="table table-striped table-bordered text-center">
|
||||||
<thead class="bg-dark text-white">
|
<thead class="bg-dark text-white">
|
||||||
|
|||||||
@@ -10,9 +10,24 @@
|
|||||||
|
|
||||||
<!-- Modal body -->
|
<!-- Modal body -->
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="p-2 rounded bg-warning text-center text-dark mb-2"><div class="inner"><b>Pembiayaan: <span id="pemb"></span></b></div></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="p-2 rounded bg-warning text-center text-dark mb-2"><div class="inner"><b>B. Pembiayaan: <span id="bpemb"></span></b></div></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="p-2 rounded bg-warning text-center text-dark mb-2"><div class="inner"><b>Status: <span id="statuslelong"></span></b></div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="table-responsive table-bordered">
|
<div class="table-responsive table-bordered">
|
||||||
<table id="biasa" class="table table-hover text-center" style="width:100%">
|
<table id="biasa" class="table table-hover text-center" style="width:100%">
|
||||||
<thead class="thead-dark">
|
<thead class="bg-dark text-white">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Bil</th>
|
<th>Bil</th>
|
||||||
<th>Jenis Marhun</th>
|
<th>Jenis Marhun</th>
|
||||||
|
|||||||
+32
-2
@@ -33,7 +33,22 @@ Route::get('/firsttime', function () {
|
|||||||
return view('/includes/login/firsttime');
|
return view('/includes/login/firsttime');
|
||||||
});
|
});
|
||||||
Route::get('/portalhome', function () {
|
Route::get('/portalhome', function () {
|
||||||
return view('/includes/home');
|
|
||||||
|
$harga_emas = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/harga_emas/')->json();
|
||||||
|
|
||||||
|
$hargaemasterdahulu = array();
|
||||||
|
|
||||||
|
foreach($harga_emas as $index=>$harga)
|
||||||
|
{
|
||||||
|
$hargaemassandaran = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/harga_emas/rekod/sandaran',['karat' => $harga['karat']])->json();
|
||||||
|
|
||||||
|
$percentnaik = (floatval($harga['harga']) - floatval($hargaemassandaran[1]['harga'])) / ($hargaemassandaran[1]['harga']) * 100;
|
||||||
|
|
||||||
|
array_push($hargaemasterdahulu,['karat' => $harga['karat'],'hargasemasa' => $harga['harga'], 'hargadahulu' => $hargaemassandaran[1]['harga'],'percent' => $percentnaik]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('includes.home',compact('hargaemasterdahulu'));
|
||||||
});
|
});
|
||||||
Route::get('/portalprofile', function () {
|
Route::get('/portalprofile', function () {
|
||||||
return view('/includes/profile');
|
return view('/includes/profile');
|
||||||
@@ -57,7 +72,22 @@ Route::get('/bayarsag', function () {
|
|||||||
|
|
||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
// return view('dashboard');
|
// return view('dashboard');
|
||||||
return view('includes.home');
|
|
||||||
|
$harga_emas = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/harga_emas/')->json();
|
||||||
|
|
||||||
|
$hargaemasterdahulu = array();
|
||||||
|
|
||||||
|
foreach($harga_emas as $index=>$harga)
|
||||||
|
{
|
||||||
|
$hargaemassandaran = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/harga_emas/rekod/sandaran',['karat' => $harga['karat']])->json();
|
||||||
|
|
||||||
|
$percentnaik = (floatval($harga['harga']) - floatval($hargaemassandaran[1]['harga'])) / ($hargaemassandaran[1]['harga']) * 100;
|
||||||
|
|
||||||
|
array_push($hargaemasterdahulu,['karat' => $harga['karat'],'hargasemasa' => $harga['harga'], 'hargadahulu' => $hargaemassandaran[1]['harga'],'percent' => $percentnaik]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('includes.home',compact('hargaemasterdahulu'));
|
||||||
})->middleware(['auth','verified']);
|
})->middleware(['auth','verified']);
|
||||||
|
|
||||||
// Route::get('/home', 'HomeController@index');
|
// Route::get('/home', 'HomeController@index');
|
||||||
|
|||||||
Reference in New Issue
Block a user