From f7fc6b9dfc1810a32f545884afdf8f3c8f7fb357 Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Tue, 18 Feb 2020 22:44:56 +0800 Subject: [PATCH] update tutorial --- app/Http/Requests/Admin/TutorialSave.php | 3 ++- database/update.sql | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Requests/Admin/TutorialSave.php b/app/Http/Requests/Admin/TutorialSave.php index fda69aa7..b1b0211e 100644 --- a/app/Http/Requests/Admin/TutorialSave.php +++ b/app/Http/Requests/Admin/TutorialSave.php @@ -8,7 +8,8 @@ class TutorialSave extends FormRequest { CONST RULES = [ 'title' => 'required', - 'category' => 'required|in:windows,macos,ios,android,linux,router', + // 1:windows 2:macos 3:ios 4:android 5:linux 6:router + 'category' => 'required|in:1,2,3,4,5,6', 'description' => 'required', 'icon' => 'required' ]; diff --git a/database/update.sql b/database/update.sql index 41bbb016..bdecdca6 100644 --- a/database/update.sql +++ b/database/update.sql @@ -164,4 +164,4 @@ ALTER TABLE `v2_order` ADD `refund_amount` int(11) NULL COMMENT '退款金额' AFTER `surplus_amount`; ALTER TABLE `v2_tutorial` -ADD `category` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `description`; +ADD `category_id` int(11) NOT NULL AFTER `id`;