/**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     //
     $categories = $this->content->meta();
     $article = $this->content->edit($id, 'article');
     //已经findOrFail处理,如果不存在该id资源会抛出异常,再加is_null判定无意义
     //is_null($article) and abort(404);
     return view('back.article.edit', ['data' => $article, 'categories' => $categories]);
 }
Beispiel #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     //
     $page = $this->content->edit($id, 'page');
     return view('back.page.edit', ['data' => $page]);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     //
     $fragment = $this->content->edit($id, 'fragment');
     return view('back.fragment.edit', ['data' => $fragment]);
 }