createTable('dashboard_widgets', function($table) { $table->bigInteger('id')->autoIncrement()->notNull(); $table->string('widget_id', 100)->notNull()->unique(); $table->string('module_name', 100)->notNull()->index(); $table->string('widget_name', 255)->notNull(); $table->text('widget_description')->nullable(); $table->string('widget_class', 255)->notNull(); $table->string('widget_method', 100)->nullable()->default('render'); $table->json('default_config')->nullable(); $table->string('widget_size', 20)->nullable()->default('medium'); $table->string('widget_category', 100)->nullable()->default('general')->index(); $table->boolean('is_active')->nullable()->default(true)->index(); $table->timestamp('created_at')->default('CURRENT_TIMESTAMP')->notNull(); $table->timestamp('updated_at')->default('CURRENT_TIMESTAMP')->notNull(); $table->bigInteger('user_id')->nullable()->index(); $table->primaryKey('id'); $table->index(['widget_id']); }); } public function down(): void { $this->dropTable('dashboard_widgets'); } }