update taglel
This commit is contained in:
@@ -345,11 +345,20 @@ class LelongController extends Controller
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
$lelongbid = LelongBid::where('lelong_id', $id)
|
||||
->get()->toArray();
|
||||
|
||||
foreach($lelongbid as $bid)
|
||||
{
|
||||
$gadai = Gadai::where('norujukan', $bid['norujukan'])->first();
|
||||
$gadai->taglel = 0;
|
||||
$gadai->update();
|
||||
}
|
||||
|
||||
$lelong = Lelong::where('id','=',$id)->first();
|
||||
// dd($role);
|
||||
$lelong->delete();
|
||||
|
||||
// $gadai = Gadai::
|
||||
return redirect()->route('lelong.senarailelong')
|
||||
->with('success','Padam Lelong Berjaya');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user