Fix code following enlightn recommendation

This commit is contained in:
Amir
2022-11-14 19:54:16 +08:00
parent afacd4d374
commit f994326dce
18 changed files with 14 additions and 28 deletions
+1 -1
View File
@@ -376,7 +376,7 @@ class AccountController extends Controller
->groupBy('lelongbidder.payment_id')
->get();
// $payments = Payment::whereIn($saggroupbyid)->get()
$total_payment = Payment::whereIn('id',$saggroupbyid)->get()->sum('total_payment');
$total_payment = Payment::whereIn('id',$saggroupbyid)->sum('total_payment');
$getresit = FileResit::join('payment', 'fileresit.payment_id', '=', 'payment.id')
->where('payment.lelong_id', $lelong_id)
+3 -2
View File
@@ -49,8 +49,9 @@ class CartController extends Controller
$carts[$index]['datalelongbid']['cawangan'] = $cawangan;
}
return response()->json($carts);
return response()->json([
"carts" => $carts
]);
}
public function getCartByCawangan($userId)
-1
View File
@@ -271,7 +271,6 @@ class HomeController extends Controller
->distinct()
->get()
->toArray();
dd($lelong);
foreach($lelong as $info)
{
@@ -1969,7 +1969,6 @@ class LelongController extends Controller
$resit->reference_no = $reference_no;
$resit->billplz_id = '';
$resit->total_payment = $sumhargabida->sum('hargabida');
dd($sumhargabida->sum('hargabida'));
$resit->resit_type = 2; // 1 = fee , 2 = bid
$resit->save();
}
+1 -1
View File
@@ -36,6 +36,6 @@ class LogoutController extends Controller
*/
public function logout(Request $request) {
Auth::logout();
return redirect('/login');
return redirect()->route('login');
}
}
@@ -419,7 +419,6 @@ class LelongMobileController extends Controller
->where('caw_id', '=', $request->caw_id)
->where('status_online', '=', 1)
->get()->toArray();
dd($lelong);
foreach($lelong as $index1 => $lel)
@@ -401,7 +401,6 @@ class PaymentController extends Controller
$updatepayment = FileResit::where('payment_id', $getpayment['payment_id'])
->where('id', $getpayment['fileresit_id'])
->first();
$updatepayment->id;
$updatepayment->user_id = $request->user_id;
$updatepayment->payment_id = $updatepayment->payment_id;
$updatepayment->file_type = $file_type;
-2
View File
@@ -12,8 +12,6 @@ class Cart extends Model
protected $table = 'carts';
protected $fillable = [
'user_id',
'lelongbid_id',
'hargabida'
];
-2
View File
@@ -13,8 +13,6 @@ class CawanganLelong extends Model
protected $fillable = [
'batchlel',
'lelong_id',
'caw_id',
'status_online',
'masamula_lelong',
'masatamat_lelong',
-2
View File
@@ -12,8 +12,6 @@ class CawanganSimulasi extends Model
protected $table = 'cawangan_simulasi';
protected $fillable = [
'simulasi_id',
'caw_id',
'online',
'export_data_sts',
'import_data_sts',
-1
View File
@@ -12,7 +12,6 @@ class File extends Model
protected $table = 'file';
protected $fillable = [
'user_id',
'file_type',
'filename',
'deleted_at',
-2
View File
@@ -12,8 +12,6 @@ class FileResit extends Model
protected $table = 'fileresit';
protected $fillable = [
'user_id',
'payment_id',
'file_type',
'filename',
'deleted_at',
-2
View File
@@ -12,8 +12,6 @@ class Invoice extends Model
protected $table = 'invoice';
protected $fillable = [
'user_id',
'lelong_id',
'invoice_no',
'total_invoice',
'invoice_type', // 1 = fee , 2 = bid
@@ -73,7 +73,7 @@
</div>
</div>
<footer class="text-light" style="">
<footer class="text-light">
<div class="py-3">
<div class="container">
<div class="row">
@@ -66,7 +66,7 @@
</div>
</div>
</div>
<footer class="text-light" style="">
<footer class="text-light">
<div class="py-3">
<div class="container">
<div class="row">
+3 -3
View File
@@ -22,12 +22,12 @@
</style>
</head>
<body class="">
<div class="d-flex align-items-center py-5 cover justify-content-center section-fade-out bg-image" style="">
<div class="d-flex align-items-center py-5 cover justify-content-center section-fade-out bg-image">
<div class="container p-5 shadow-lg bg-login-text">
<div class="row">
<div class="col-md-6 d-flex flex-column justify-content-center align-items-center border-right">
<h1 class="text-light"><i class="fa fa-fw fa-gavel"></i>ArrahnBid</h1>
<p class="pb-4 text-light" style="">Bida Harga Lelong Emas Anda Sekarang Secara Atas Talian</p>
<p class="pb-4 text-light">Bida Harga Lelong Emas Anda Sekarang Secara Atas Talian</p>
</div>
<div class="col-md-6 flex-column active show p-5 border-left">
<form method="POST" action="{{ route('login') }}">
@@ -87,7 +87,7 @@
</div>
</div>
</div>
<footer class="text-light" style="">
<footer class="text-light">
<div class="py-3">
<div class="container">
<div class="row">
+1 -1
View File
@@ -63,7 +63,7 @@
</div>
</div>
</div>
<footer class="text-light" style="">
<footer class="text-light">
<div class="py-3">
<div class="container">
<div class="row">
+3 -3
View File
@@ -23,12 +23,12 @@
</style>
</head>
<body class="">
<div class="d-flex align-items-center py-5 cover justify-content-center section-fade-out bg-image" style="">
<div class="d-flex align-items-center py-5 cover justify-content-center section-fade-out bg-image">
<div class="container p-5 shadow-lg bg-login-text">
<div class="row">
<div class="col-md-6 d-flex flex-column justify-content-center align-items-center border-right">
<h1 class="text-light"><i class="fa fa-fw fa-gavel"></i>ArrahnBid</h1>
<p class="pb-4 text-light" style="">Bida Harga Lelong Emas Anda Sekarang Secara Atas Talian</p>
<p class="pb-4 text-light">Bida Harga Lelong Emas Anda Sekarang Secara Atas Talian</p>
</div>
<div class="col-md-6 flex-column active show p-5 border-left">
<form method="POST" action="{{ route('login') }}">
@@ -75,7 +75,7 @@
</div>
</div>
</div>
<footer class="text-light" style="">
<footer class="text-light">
<div class="py-3">
<div class="container">
<div class="row">