public function destroy($id) { $retailer = Retailer::find($id); $retailer->delete(); if ($retailer) { $retailers = Retailer::all(); Session::flash('register-retailer', 'Successfully delete the retailer'); Session::flash('alert-type', 'alert-success'); return \Redirect::to('/retailer/view')->with('deleted-retailer', $retailer)->with('retailers', $retailers)->with('title', 'Retailers'); } }