Exemplo n.º 1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function IndexAction()
 {
     $menu = $this->menu;
     $site_infos = $this->site_infos;
     $destination = $this->destination;
     $sp_package = $this->special_package();
     $banner = Banner::select('title', 'image', 'short_description')->where('status', 'Active')->get();
     return view('front.home.home', compact('site_infos', 'destination', 'menu', 'banner', 'sp_package'));
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return Response
  */
 public function DeleteAction($id)
 {
     $this->banner = Banner::find($id);
     if ($this->banner) {
         $this->banner->delete();
         @unlink($this->image_path . '/' . $this->banner->image);
         return redirect()->route('banner/list')->with('message', Lang::get('response.CUSTOM_MESSAGE_SUCCESS', ['message' => 'The Banner Field has successfully Deleted']));
     }
     return redirect()->back()->with('message', Lang::get('response.CUSTOM_MESSAGE_ALERT', ['message' => 'Invalid Request']));
 }