From de17f96610aba1b74cd89a83571c3b0163898f22 Mon Sep 17 00:00:00 2001 From: liapples Date: Thu, 11 Nov 2021 23:16:13 +0800 Subject: [PATCH] =?UTF-8?q?select(category=5Fid)=E5=A2=9E=E5=8A=A0help?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/AdminSupplier/Controllers/ProductController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/AdminSupplier/Controllers/ProductController.php b/app/AdminSupplier/Controllers/ProductController.php index 2c50386..ad023db 100644 --- a/app/AdminSupplier/Controllers/ProductController.php +++ b/app/AdminSupplier/Controllers/ProductController.php @@ -147,7 +147,10 @@ class ProductController extends AdminController $form->display('id'); $options = Category::selectOptions(fn($query) => $query->where('agent_id', 0)->whereIn('publish_type', Admin::user()->publish_type)); - $form->select('category_id')->options(array_slice($options, 1, null, true))->required(); + $form->select('category_id') + ->options(array_slice($options, 1, null, true)) + ->help('旅游线路对应旅游线路;酒店对应酒店住宿;景区对应景点综合;餐厅对应餐饮娱乐;车队对应旅游交通;单项对应旅游购物') + ->required(); $cat2publish_type = json_encode(Category::where('agent_id', 0)->pluck('publish_type', 'id')); Admin::script(<<