/** * Delete a campaign * * @param integer $id * @return Redirect */ public function destroy($id) { if ($this->campaign->delete($id)) { return redirect('campaign')->with('message', 'Successfully deleted.'); } return redirect('campaign/' . $id)->withInput()->with('message_error', 'Error while deleting campaign. Please try again.'); }
/** * Display campaign page. * * @return View */ public function index() { $data = array('restaurant' => $this->restaurant->getByAttributes(['merchant_id' => Auth::user()->id], false), 'campaigns' => $this->campaign->getAllByAttributes(['merchant_id' => Auth::user()->id], 'created_at', 'DESC')); return view('notifications.index', $data); }