public static function subscribers($stock) { $company = is_object($stock) ? $stock->company : $stock; return Subscriber::select("phone in (SELECT phone FROM " . static::$table . " WHERE company=?)", [$company]); }
/** * Show a list of all the blog posts formatted for Datatables. * * @return Datatables JSON */ public function getData() { $subscribers = Subscriber::select(array('fbf_newsletter_signups.id', 'fbf_newsletter_signups.email', 'fbf_newsletter_signups.created_at')); return Datatables::of($subscribers)->add_column('actions', '<a href="{{{ URL::to(\'admin/subscribers/\' . $id . \'/delete\' ) }}}" class="btn btn-xs btn-danger iframe">{{{ Lang::get(\'button.delete\') }}}</a> ')->remove_column('id')->make(); }