update tanggal update landing
This commit is contained in:
parent
9890468fa6
commit
4dd96ea9ef
|
@ -13,9 +13,9 @@ public function index()
|
||||||
{
|
{
|
||||||
$klasters = Klaster::orderBy('id', 'desc')->get();
|
$klasters = Klaster::orderBy('id', 'desc')->get();
|
||||||
$updateCuras = Curas::latest('updated_at')->first();
|
$updateCuras = Curas::latest('updated_at')->first();
|
||||||
$tanggalCuras = $updateCuras->updated_at->translatedFormat('d F Y');
|
$tanggalCuras = \Carbon\Carbon::parse($updateCuras->updated_at)->translatedFormat('d F Y');
|
||||||
$updateCuranmor = Curanmor::latest('updated_at')->first();
|
$updateCuranmor = Curanmor::latest('updated_at')->first();
|
||||||
$tanggalCuranmor = $updateCuranmor->updated_at->translatedFormat('d F Y');
|
$tanggalCuranmor = \Carbon\Carbon::parse($updateCuranmor->updated_at)->translatedFormat('d F Y');
|
||||||
return view('landing', compact('klasters', 'tanggalCuras', 'tanggalCuranmor'));
|
return view('landing', compact('klasters', 'tanggalCuras', 'tanggalCuranmor'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@ class Curas extends Model
|
||||||
/** @use HasFactory<\Database\Factories\CurasFactory> */
|
/** @use HasFactory<\Database\Factories\CurasFactory> */
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
protected $guarded =['id'];
|
protected $guarded =['id'];
|
||||||
|
|
||||||
public function punyaKlasterCuras(): BelongsTo{
|
public function punyaKlasterCuras(): BelongsTo{
|
||||||
|
|
|
@ -43,11 +43,15 @@ public function run(): void
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
$defaultDate = '2024-12-31 00:00:00'; // Default date to be used for both created_at and updated_at
|
||||||
|
|
||||||
foreach ($kecamatanIds as $kecamatanId) {
|
foreach ($kecamatanIds as $kecamatanId) {
|
||||||
Curas::create([
|
Curas::create([
|
||||||
'kecamatan_id' => $kecamatanId,
|
'kecamatan_id' => $kecamatanId,
|
||||||
'jumlah_curas' => $dataCuras[$kecamatanId],
|
'jumlah_curas' => $dataCuras[$kecamatanId],
|
||||||
'klaster_id' => $klasterIds->random(),
|
'klaster_id' => $klasterIds->random(),
|
||||||
|
'created_at' => $defaultDate,
|
||||||
|
'updated_at' => $defaultDate,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1296,6 +1296,7 @@ class="img-fluid iqwork-right animateme"
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<!-- Solutions END -->
|
<!-- Solutions END -->
|
||||||
|
|
||||||
<!-- Team section -->
|
<!-- Team section -->
|
||||||
<section class="iq-bestteam main-bg position-relative pt-0" id="sectionOurTeam">
|
<section class="iq-bestteam main-bg position-relative pt-0" id="sectionOurTeam">
|
||||||
<div class="container mt-5">
|
<div class="container mt-5">
|
||||||
|
|
Loading…
Reference in New Issue