2021_01_04_172833_add-paybeaver-payment.php 587 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. use App\Models\Config;
  3. use Illuminate\Database\Migrations\Migration;
  4. class AddPaybeaverPayment extends Migration
  5. {
  6. protected $configs = [
  7. 'paybeaver_app_id',
  8. 'paybeaver_app_secret',
  9. ];
  10. /**
  11. * Run the migrations.
  12. *
  13. * @return void
  14. */
  15. public function up()
  16. {
  17. foreach ($this->configs as $config) {
  18. Config::insert(['name' => $config]);
  19. }
  20. }
  21. /**
  22. * Reverse the migrations.
  23. *
  24. * @return void
  25. */
  26. public function down()
  27. {
  28. Config::destroy($this->configs);
  29. }
  30. }