SendOrder.php 709 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Admin\Actions;
  3. use Dcat\Admin\Form\AbstractTool;
  4. use Dcat\Admin\Widgets\Modal;
  5. class SendOrder 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 = '<i class="feather icon-check-square"></i> ' . $this->title;
  16. $this->id = $id;
  17. }
  18. public function render()
  19. {
  20. $form = SendOrderForm::make()->payload(['id' => $this->id]);
  21. return Modal::make()
  22. ->lg()
  23. ->title($this->title)
  24. ->body($form)
  25. ->button($this->title);
  26. }
  27. }