mirror of
https://github.com/v2board/v2board.git
synced 2024-11-15 00:09:13 +08:00
update tutorial
This commit is contained in:
parent
61b31c1925
commit
5154993887
@ -49,9 +49,10 @@ class TutorialController extends Controller
|
|||||||
'data' => $tutorial
|
'data' => $tutorial
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$tutorial = Tutorial::select(['id', 'title', 'description', 'icon'])
|
$tutorial = Tutorial::select(['id', 'title', 'icon'])
|
||||||
->where('show', 1)
|
->where('show', 1)
|
||||||
->get();
|
->get()
|
||||||
|
->groupBy('category');
|
||||||
$user = User::find($request->session()->get('id'));
|
$user = User::find($request->session()->get('id'));
|
||||||
$response = [
|
$response = [
|
||||||
'data' => [
|
'data' => [
|
||||||
|
@ -10,7 +10,6 @@ class TutorialSave extends FormRequest
|
|||||||
'title' => 'required',
|
'title' => 'required',
|
||||||
// 1:windows 2:macos 3:ios 4:android 5:linux 6:router
|
// 1:windows 2:macos 3:ios 4:android 5:linux 6:router
|
||||||
'category_id' => 'required|in:1,2,3,4,5,6',
|
'category_id' => 'required|in:1,2,3,4,5,6',
|
||||||
'description' => 'required',
|
|
||||||
'icon' => 'required'
|
'icon' => 'required'
|
||||||
];
|
];
|
||||||
/**
|
/**
|
||||||
@ -29,7 +28,6 @@ class TutorialSave extends FormRequest
|
|||||||
'title.required' => '标题不能为空',
|
'title.required' => '标题不能为空',
|
||||||
'category_id.required' => '分类不能为空',
|
'category_id.required' => '分类不能为空',
|
||||||
'category_id.in' => '分类格式不正确',
|
'category_id.in' => '分类格式不正确',
|
||||||
'description.required' => '描述不能为空',
|
|
||||||
'icon.required' => '图标不能为空'
|
'icon.required' => '图标不能为空'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user