/** * Remove the specified resource from storage. * * @param GalleryCategory $category * @return Response */ public function destroy(GalleryCategory $category) { \File::deleteDirectory(config('gallery.gallery_path') . '/' . $category->id . '/'); $category->delete(); if (\Request::ajax()) { return ''; } return redirect()->route('admin.gallery.index'); }