public function getReject($id) { // @TODO: Move this to a repository $confession = Confession::findOrFail($id); if (!$this->confessionsRepo->getPageToken()) { return \Redirect::back()->withMessage('You have not connected your account with Facebook.')->with('alert-class', 'alert-danger'); } try { $this->confessionsRepo->switchStatus($confession, 'Rejected'); return \Redirect::back()->withMessage('Confession successfully rejected.')->with('alert-class', 'alert-success'); } catch (\Exception $e) { return \Redirect::back()->withMessage('Error rejecting confession: ' . $e->getMessage())->with('alert-class', 'alert-danger'); } }