/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { BlogCategory::where('parent_id', '=', $id)->delete(); $cat = BlogCategory::find($id); if ($cat) { $cat->delete(); } return array('status' => 'OK'); }