/** * 处理新增文章分类 * * @author yangyifan <*****@*****.**> */ public function postAdd(NewsCatRequest $request) { $affected_number = NewsCatModel::create($request->all()); return $affected_number->id > 0 ? $this->response(200, trans('response.add_success'), [], true, url('admin/news-cat/index')) : $this->response(400, trans('response.add_error'), [], true, url('admin/news-cat/index')); }