12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace App\Admin\Forms;
- use App\Admin\Repositories\BaseProductCategory;
- use App\Admin\Repositories\RpcAlbum;
- use App\Libraries\CommonHelper;
- use App\Models\BaseProduct;
- use App\Models\BaseProductImage;
- use Dcat\Admin\Widgets\Form;
- class ProductAudit extends Form
- {
- public function title()
- {
- return 'Copy';
- }
- /**
- * Handle the form request.
- *
- * @param array $input
- *
- * @return mixed
- */
- public function handle(array $input)
- {
- $id = $this->payload['id'] ?? null;
-
- return $this
- ->response()
- ->success('导入成功')
- ->refresh();
- }
- /**
- * Build a form here.
- */
- public function form()
- {
- // 设置隐藏表单,传递用户id
- $this->select('category_id', admin_trans_label('category_name'))
- ->options(BaseProductCategory::selectOptions())
- ->required();
- $this->hidden('album_ids')->attribute('id', 'album_ids');
- }
- /**
- * The data of the form.
- *
- * @return array
- */
- public function default()
- {
- return [];
- }
- }
|