App\Http\Controllers\Backend\NewsController::destroy PHP Method

destroy() public method

Remove the specified resource from storage.
public destroy ( integer $id ) : Response
$id integer
return Response
    public function destroy($id)
    {
        $news = $this->repository->find($id);
        $news->tags()->detach();
        $news->delete();
        return redirect()->route('admin.news.index')->withSuccess('Post deleted.');
    }