jana pemenang huduh2

This commit is contained in:
faiqahzaman
2022-02-09 16:51:54 +08:00
parent 5dd7fe1704
commit c4f446c274
4 changed files with 67 additions and 2 deletions
+21 -1
View File
@@ -23,6 +23,7 @@ use App\Models\CawanganSimulasi;
use App\Models\Lelong;
use App\Models\CawanganLelong;
use App\Models\LelongBid;
use App\Models\LelongBidder;
use App\Models\LelongBidMarhun;
use App\Models\LelKarat;
use App\Models\LelKarat_temp;
@@ -195,7 +196,6 @@ class LelongController extends Controller
$total_bakilelong = $total_bakilelong + $bakilelong;
}
return view('lelong.showlelong',compact(
'arraycaw',
@@ -419,6 +419,26 @@ class LelongController extends Controller
return redirect()->route('lelong.show',$request->idlelong)
->with('success','Kemaskini Berjaya');
}
public function janapemenang(Request $request){
$lelongbidder = LelongBidder::join('users', 'lelongbidder.user_id', '=', 'users.id')
->select(
'users.name',
'users.nokp',
'users.notelbimbit',
'lelongbidder.hargabida'
)
->where('lelongbid_id', '=', $request->id)
->orderBy('masa_bidaan','desc')
->orderBy('hargabida','desc')
->first();
// dd($lelongbidder);
return view('lelong.janapemenang',compact('lelongbidder'));
}
public function stop($id)
{