ToothLog.php 671 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Admin\Actions\Form;
  3. use Dcat\Admin\Form\AbstractTool;
  4. use Dcat\Admin\Widgets\Modal;
  5. class ToothLog extends AbstractTool
  6. {
  7. /**
  8. * @return string
  9. */
  10. protected $title = '长牙记录';
  11. protected $model;
  12. public function __construct(string $model = null, $id = 0)
  13. {
  14. $this->model = $model;
  15. $this->title = $this->title;
  16. $this->id = $id;
  17. }
  18. public function render()
  19. {
  20. $form = ToothLogForm::make()->payload(['id' => $this->id]);
  21. return Modal::make()
  22. ->lg()
  23. ->title($this->title)
  24. ->body($form)
  25. ->button($this->title);
  26. }
  27. }