/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy(Banner $banner) { $image = Attachment::where('id', $banner->attachment_id); $banner->delete(); $image->delete(); return redirect()->route('admin.banner.index'); }
/** * Remove the specified resource from storage. * * @param Services $services * @return \Illuminate\Http\RedirectResponse * @throws \Exception */ public function destroy(Services $services) { $image = Attachment::where('id', $services->attachment_id); $services->delete(); $image->delete(); return redirect()->route('admin.services.index'); }