2025_12_05_172823_insert_config.php 756 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. use Illuminate\Support\Facades\DB;
  6. return new class extends Migration
  7. {
  8. /**
  9. * Run the migrations.
  10. *
  11. * @return void
  12. */
  13. public function up()
  14. {
  15. DB::table('config')->insert([
  16. [
  17. 'field' => 'maintenance_switch',
  18. 'val' => "1000",
  19. 'remark' => '维护开关',
  20. 'group_id' => 0,
  21. 'created_at' => now(),
  22. 'updated_at' => now(),
  23. ]
  24. ]);
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. //
  34. }
  35. };