本文整理汇总了PHP中Subscriber::getActiveServices方法的典型用法代码示例。如果您正苦于以下问题:PHP Subscriber::getActiveServices方法的具体用法?PHP Subscriber::getActiveServices怎么用?PHP Subscriber::getActiveServices使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Subscriber
的用法示例。
在下文中一共展示了Subscriber::getActiveServices方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dashboard
public function dashboard()
{
$subscriber = Subscriber::find(Auth::id());
$plan = Subscriber::getActiveServices($subscriber);
return View::make('user.prepaid.dashboard')->with('profile', Auth::user())->with('plan', $plan);
}
示例2: getActiveServices
public function getActiveServices($user_id)
{
$profile = Subscriber::findOrFail($user_id);
$plan = Subscriber::getActiveServices($profile);
$framedIP = SubnetIP::where('user_id', $user_id)->first();
$framedRoute = UserRoute::where('user_id', $user_id)->first();
switch ($profile->plan_type) {
case FREE_PLAN:
case PREPAID_PLAN:
$rc_history = Voucher::where('user_id', $user_id)->leftJoin('voucher_limits as l', 'l.id', '=', 'limit_id')->paginate(5);
return View::make("admin.accounts.services")->with('profile', $profile)->with('rc_history', $rc_history)->with('plan', $plan)->with('framedIP', $framedIP)->with('framedRoute', $framedRoute);
break;
case ADVANCEPAID_PLAN:
$rproducts = APRecurringProduct::where('user_id', $profile->id)->get();
$nrproducts = APNonRecurringProduct::where('user_id', $profile->id)->get();
return View::make('admin.accounts.services-ap2')->with('profile', $profile)->with('plan', $plan)->with('framedIP', $framedIP)->with('framedRoute', $framedRoute)->with('rproducts', $rproducts)->with('nrproducts', $nrproducts);
break;
}
}