diff --git a/app/Console/Commands/kemaskiniCawanganLelong.php b/app/Console/Commands/kemaskiniCawanganLelong.php new file mode 100644 index 00000000..ca9fd2ba --- /dev/null +++ b/app/Console/Commands/kemaskiniCawanganLelong.php @@ -0,0 +1,57 @@ +select('id')->get(); + foreach($lelong as $lel) + { + foreach($lel->cawangan as $caw) + { + $lelong_bid = LelongBid::where('kodcaw', $caw->caw_code)->where('lelong_id', $lel->id)->first(); + if($lelong_bid == null) + { + CawanganLelong::where('caw_id', $caw->id)->where('lelong_id', $lel->id)->delete(); + } + } + } + } +}