/**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(PageRequest $request)
 {
     $data = $request->all();
     $content = $this->content->store($data, 'page', user('id'));
     if ($content->id) {
         //添加成功
         return redirect()->route('admin.page.index')->with('message', '成功发布新单页!');
     } else {
         //添加失败
         return redirect()->back()->withInput($request->input())->with('fail', '数据库操作返回异常!');
     }
 }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(ArticleRequest $request)
 {
     $data = $request->all();
     //获取请求过来的数据
     $content = $this->content->store($data, 'article', user('id'));
     //使用仓库方法存储
     if ($content->id) {
         //添加成功
         return redirect()->route('admin.article.index')->with('message', '成功发布新文章!');
     } else {
         //添加失败
         return redirect()->back()->withInput($request->input())->with('fail', '数据库操作返回异常!');
     }
 }