Show tarikh_lelong when select batch component

This commit is contained in:
Amir
2023-02-08 12:06:45 +08:00
parent 483f5a9e68
commit a9e53a4bc1
2 changed files with 7 additions and 2 deletions
@@ -1433,7 +1433,12 @@ class LelongMobileController extends Controller
public function listLelong()
{
$lelong_all = Lelong::select('id')->get();
$lelong_all = Lelong::select('id', 'tarikh_lelong')->get();
foreach($lelong_all as $index => $lelong)
{
$date_convert = strtotime($lelong->tarikh_lelong);
$lelong_all[$index]['tarikh_lelong'] = date("d-m-Y", $date_convert);
}
return response()->json($lelong_all);
}