YzOptionsTableSeeder.php 888 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. use Illuminate\Database\Seeder;
  3. class YzOptionsTableSeeder extends Seeder
  4. {
  5. /**
  6. * Auto generated seed file
  7. *
  8. * @return void
  9. */
  10. public function run()
  11. {
  12. return;
  13. $newList = \Illuminate\Support\Facades\DB::table('yz_options')->get();
  14. if($newList->isNotEmpty()){
  15. echo "yz_options 已经有数据了跳过\n";
  16. return ;
  17. }
  18. \Illuminate\Support\Facades\DB::table('yz_options')->insert(array (
  19. 0 =>
  20. array (
  21. 'id' => 1,
  22. 'option_name' => 'example-plugin',
  23. 'option_value' => 'true',
  24. ),
  25. 1 =>
  26. array (
  27. 'id' => 2,
  28. 'option_name' => 'plugins_enabled',
  29. 'option_value' => '["example-plugin"]',
  30. ),
  31. ));
  32. }
  33. }