feat(custom-field): tambahkan kolom label dan urutan prioritas

- Menambahkan kolom 'label' pada tabel custom_fields.
- Menambahkan kolom 'urutan_prioritas' pada tabel custom_fields.
- Memperbarui model CustomField untuk menyertakan kolom baru.
- Memperbarui form input untuk label dan urutan prioritas di tampilan create dan index.
- Menambahkan validasi untuk label dan urutan prioritas di CustomFieldRequest.
This commit is contained in:
Daeng Deni Mardaeni
2025-01-30 16:14:48 +07:00
parent b8a84bb7e1
commit 18cbb0bbc5
7 changed files with 251 additions and 136 deletions

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('custom_fields', function (Blueprint $table) {
$table->integer('urutan_prioritas')->nullable()->after('type');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('custom_fields', function (Blueprint $table) {
$table->dropColumn('urutan_prioritas');
});
}
};

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('custom_fields', function (Blueprint $table) {
$table->string('label')->nullable()->after('name');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('custom_fields', function (Blueprint $table) {
$table->dropColumn('label');
});
}
};