Skip to content

Commit 350d76c

Browse files
Add handphone field to daftar_pulsa_mitras table and update related logic in PulsaController
1 parent 551305f commit 350d76c

File tree

4 files changed

+2
-2
lines changed

4 files changed

+2
-2
lines changed

app/Helpers/Helper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,6 @@ public static function formatPulsaMitra($mitra)
14461446
$item['nama'] = optional($mitra)->nama;
14471447
$item['nik'] = optional($mitra)->nik;
14481448
$item['nik_tag'] = '${'.optional($mitra)->nik.'}';
1449-
$item['no_hp'] = optional($mitra)->no_pulsa;
14501449
$item['bukti'] = $item['file'];
14511450
unset($item['mitra_id']);
14521451
unset($item['id']);

app/Http/Controllers/PulsaController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function submitConfirm(Request $request)
131131
$updateMitra = $mitraModel->save();
132132
$updateDaftar = DaftarPulsaMitra::where('pulsa_kegiatan_id', session('pulsaKegiatanId'))
133133
->where('mitra_id', session('mitraId'))
134-
->update(['confirmed' => true]);
134+
->update(['confirmed' => true, 'handphone' => $handphone]);
135135
if ($updateMitra > 0 && $updateDaftar > 0) {
136136
Swal::success([
137137
'title' => 'Berhasil',

database/migrations/2025_07_28_081642_create_daftar_pulsa_mitras_table.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public function up(): void
1414
Schema::create('daftar_pulsa_mitras', function (Blueprint $table) {
1515
$table->id();
1616
$table->decimal('volume', 5)->nullable()->unsigned();
17+
$table->string('handphone', 20)->nullable();
1718
$table->mediumInteger('nominal')->nullable()->unsigned();
1819
$table->mediumInteger('harga')->nullable()->unsigned();
1920
$table->boolean('confirmed')->nullable()->default(false);
Binary file not shown.

0 commit comments

Comments
 (0)