/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { if ($result = check_auth_to('WZGL_DELETE')) { return $result; } try { ArticleStatus::deleteArticleStatus($id); Article::destroy($id); Article::resetRedisCache(); Cache::forget(Article::REIDS_ARTICLE_CACHE . $id); return redirect()->action('Admin\\ArticleController@index')->with('operationstatus', 'sucess'); } catch (\Exception $e) { return redirect()->back()->withErrors(['error' => '删除文章失败,请重试(' . $e->getMessage() . ')']); } }