完成文档分类

This commit is contained in:
augushong
2021-03-29 12:33:31 +08:00
parent 6fd50e255d
commit a993db8781
11 changed files with 94 additions and 53 deletions

View File

@@ -126,13 +126,10 @@ class Category extends Common
public function update(Request $request, $id)
{
//
$post_data = $request->post();
$model_category = ModelCategory::where('title',$post_data['title'])
->where('pid',$post_data['pid'])
->where('type',$post_data['type'])
->where('id','<>',$id)
->find();

View File

@@ -19,7 +19,8 @@ class Post extends Common
{
parent::initialize();
ModelPost::quickSelect(true);
$list_post = ModelPost::quickSelect(true);
}
/**
@@ -118,7 +119,9 @@ class Post extends Common
//
$model_post = ModelPost::find($id);
$list_category = Category::where('status', 1)->order('sort asc')->select();
View::assign('list_category', $list_category);
View::assign('post', $model_post);