2020_09_07_090635_create_admin_settings_table.php 790 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateAdminSettingsTable extends Migration
  6. {
  7. public function getConnection()
  8. {
  9. return config('database.connection') ?: config('database.default');
  10. }
  11. /**
  12. * Run the migrations.
  13. *
  14. * @return void
  15. */
  16. public function up()
  17. {
  18. Schema::create('admin_settings', function (Blueprint $table) {
  19. $table->string('slug', 100)->primary();
  20. $table->longText('value');
  21. $table->timestamps();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. *
  27. * @return void
  28. */
  29. public function down()
  30. {
  31. Schema::dropIfExists('admin_settings');
  32. }
  33. }