/**
  * 添加网址分类
  *
  * @param Request $request
  * @author yangyifan <*****@*****.**>
  */
 public function postSiteCategory(SearchCatRequest $request)
 {
     $data = $request->all();
     //加载函数库
     load_func('common');
     $data['user_info_id'] = is_user_login();
     $affected_number = SiteCatModel::create($data);
     return $affected_number->id > 0 ? $this->response(200, trans('response.add_success'), [], false) : $this->response(400, trans('response.add_error'), [], false);
 }
 /**
  * 添加网址分类
  *
  * @param Request $request
  * @author yangyifan <*****@*****.**>
  */
 public function postSiteCategory(SearchCatRequest $request)
 {
     if (Session::get('admin_info.id') > 0) {
         //写入数据
         $affected_number = SiteCatModel::create($request->all());
         return $affected_number->id > 0 ? $this->response(200, trans('response.add_success'), [], false, url('admin/site/index')) : $this->response(400, trans('response.add_error'), [], false);
     }
 }
 /**
  * 处理搜索工具分类
  *
  * @author yangyifan <*****@*****.**>
  */
 public function postAdd(SearchCatRequest $request)
 {
     $affected_number = SearchCatModel::create($request->all());
     return $affected_number->id > 0 ? $this->response(200, trans('response.add_success'), [], true, url('admin/search-cat/index')) : $this->response(400, trans('response.add_error'), [], true, url('admin/search-cat/index'));
 }