Example #1
0
 public function unsubscribe($code)
 {
     \NewsletterModel::where('hash', $code)->update(array('enabled' => 0));
     return (new \PageController())->createPageFrom(function () {
         Template::setPageTitle('Newsletter');
         Template::clearBreadCrumbs();
         Template::addBreadCrumb('/', 'Home');
         Template::addBreadCrumb('#', 'Newsletter');
         return View::make(Newsletter::$view_unsub);
     });
 }