FormSet.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class FormSet extends Model
  5. {
  6. protected $table = 'form_sets';
  7. protected $guarded = [];
  8. public function createDefault()
  9. {
  10. return self::create([
  11. 'mode' => 1,
  12. 'show_below_index' => 1,
  13. 'top_title' => '产品咨询',
  14. 'top_desp' => '如果对我们的产品感兴趣,请填写下面的表单',
  15. 'interval' => 1,
  16. 'success_info' => '提交成功',
  17. 'text_1' => '姓名',
  18. 'text_1_status' => 1,
  19. 'text_1_need' => 1,
  20. 'text_2' => '联系方式',
  21. 'text_2_status' => 1,
  22. 'text_2_need' => 1,
  23. 'text_3' => '邮箱',
  24. 'text_3_status' => 1,
  25. 'text_3_need' => 1,
  26. 'text_4' => '其他',
  27. 'text_4_status' => 1,
  28. 'text_4_need' => 1,
  29. 'multi_text' => '请输入您的意见',
  30. 'multi_text_status' => 1,
  31. 'multi_text_need' => 1,
  32. 'radio' => '',
  33. 'radio_value' => '',
  34. 'radio_status' => 1,
  35. 'radio_need' => 1,
  36. 'checkbox' => '',
  37. 'checkbox_value' => '',
  38. 'checkbox_status' => 1,
  39. 'checkbox_need' => 1
  40. ]);
  41. }
  42. }