海南旅游SAAS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
503 B

  1. <?php
  2. namespace App\AdminAgent\Forms;
  3. use App\Models\ProductSpec;
  4. use Dcat\Admin\Widgets\Form;
  5. use Dcat\Admin\Traits\LazyWidget;
  6. use Dcat\Admin\Contracts\LazyRenderable;
  7. class LoadSupplierSpec extends Form implements LazyRenderable
  8. {
  9. use LazyWidget;
  10. // 处理请求
  11. public function handle(array $input)
  12. {
  13. $id = $input['id'];
  14. $spec = ProductSpec::where('product_id', $id)->get()->toArray();
  15. return $this->response()->data($spec);
  16. }
  17. public function form()
  18. {
  19. $this->hidden('id');
  20. }
  21. }