migration lelonngbid

This commit is contained in:
faiqahzaman
2022-03-13 13:02:15 +08:00
parent d612a0acd5
commit 984fae9a3c
6 changed files with 211 additions and 2 deletions
@@ -706,6 +706,43 @@ class SimulasiController extends Controller
}
public function senaraimarhunlel($lelongid, $cawid)
{
$marhuns = LelongBid::join('cawangan', 'lelongbid.caw_id', '=', 'cawangan.id')
->where('lelong_id','=',$lelongid)
->where('caw_id','=',$cawid)
->select(
'lelongbid.t_lelong',
'lelongbid.kodcaw',
'cawangan.caw_name',
'lelongbid.norujukan',
'lelongbid.pinjaman',
'lelongbid.berat',
'lelongbid.nilaimarhun',
'lelongbid.hargaasas',
'lelongbid.upahsimpan',
'lelongbid.cajlelong',
'lelongbid.baki',
'lelongbid.status_jual',
)
->get();
return view('lelong.senaraimarhunsim',compact('marhuns','lelongid','cawid'));
}
public function deletemarhunlel(Request $request){
dd($request->checkboxdata);
$data = $request->checkboxdata;
foreach($data as $index=>$norujukan)
{
$marhun = LelongBid::where('norujukan','=',$norujukan)->first();
$marhun->delete();
}
return redirect()->route('lelong.senaraimarhunlel',['lelongid'=>$request->lelongid,'cawid'=>$request->cawid])
->with('success','Delete Berjaya');
}
}