Exemplo n.º 1
0
 /**
  * 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');
 }
Exemplo n.º 2
0
 /**
  * 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');
 }