This commit is contained in:
2021-01-19 15:46:29 +08:00
parent 3894209c63
commit 4e6110cdc0
6 changed files with 32 additions and 25 deletions

View File

@@ -125,16 +125,16 @@ class IndexController extends AdminController
$form->saving(function (Form $form) {
if (request()->has('title')) {
if (request()->type == Category::TYPE_SHOW && empty(request()->article_id)) {
$error = new MessageBag([
'title' => '错误',
'message' => '文章类型是文章详情的时候需要选择关联文章',
]);
return back()->withInput()->with(compact('error'));
}
}
// if (request()->has('title')) {
// if (request()->type == Category::TYPE_SHOW && empty(request()->article_id)) {
// $error = new MessageBag([
// 'title' => '错误',
// 'message' => '文章类型是文章详情的时候需要选择关联文章',
// ]);
//
// return back()->withInput()->with(compact('error'));
// }
// }
});