/** * Update the specified article in storage. * * @param $id * @return \Illuminate\Http\Response */ public function draft($id) { $article = Article::whereId($id)->firstOrFail(); $article->status = 'draft'; if ($article->save()) { return redirect(route('account.article.index'))->with(['status' => 'warning', 'message' => Lang::get('alert.article.mark', ['title' => $article->title, 'type' => 'status', 'label' => 'draft'])]); } return redirect()->back()->withErrors(['error' => Lang::get('alert.error.database')]); }