/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($slug) { $category = Category::where('slug', '=', $slug)->firstorFail(); $category->delete(); return redirect('admin/category')->with('message', ['class' => 'success', 'message' => 'Category deleted.']); }