Enhance settings management: Added support for new form types including color picker, code editor, rich editor, markdown editor, tags input, checkbox list, radio buttons, toggle buttons, and slider in the SettingForm. Updated the Setting model to handle these new types and modified the migration to include them in the type enum. Enhanced localization files to support new type labels in both English and Turkish.
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
<?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('settings', function (Blueprint $table) {
|
||||
$table->enum('type', [
|
||||
'string',
|
||||
'text',
|
||||
'boolean',
|
||||
'integer',
|
||||
'float',
|
||||
'array',
|
||||
'json',
|
||||
'file',
|
||||
'date',
|
||||
'datetime',
|
||||
'color_picker',
|
||||
'code_editor',
|
||||
'rich_editor',
|
||||
'markdown_editor',
|
||||
'tags_input',
|
||||
'checkbox_list',
|
||||
'radio',
|
||||
'toggle_buttons',
|
||||
'slider',
|
||||
'key_value',
|
||||
])->default('string')->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->enum('type', [
|
||||
'string',
|
||||
'text',
|
||||
'boolean',
|
||||
'integer',
|
||||
'float',
|
||||
'array',
|
||||
'json',
|
||||
'file',
|
||||
'date',
|
||||
'datetime',
|
||||
])->default('string')->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user