本文整理汇总了PHP中app\models\Payment::earningPercentage方法的典型用法代码示例。如果您正苦于以下问题:PHP Payment::earningPercentage方法的具体用法?PHP Payment::earningPercentage怎么用?PHP Payment::earningPercentage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Payment
的用法示例。
在下文中一共展示了Payment::earningPercentage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionDashboard
/**
* Display user dashboard
*/
public function actionDashboard()
{
//$model = Yii::$app->user->identity;
$journals = new ActiveDataProvider(['query' => Journal::find()->orderBy(['date' => SORT_DESC])->limit(5), 'pagination' => false]);
$events = new ActiveDataProvider(['query' => \app\models\Event::find()->orderBy(['date' => SORT_DESC])->limit(5), 'pagination' => false]);
$photos = \app\models\Photos::find()->orderBy(['id' => SORT_DESC])->limit(5)->all();
$wishlists = new ActiveDataProvider(['query' => \app\models\Wishlist::find()->where(['status' => 0])->orderBy('id')->limit(5), 'pagination' => false]);
$DataProvider = new ActiveDataProvider(['query' => User::find()->where('level !=0 AND parent_id=0')->orderBy('id')]);
$RegisteredMembers = count(User::find()->where('level > :level', [':level' => 3])->orWhere('level > :level', [':level' => 2])->orWhere('level > :level', [':level' => 1])->all());
$famillies = User::find()->where(['level' => '1'])->count();
$orders = count(\app\models\Payment::find()->all());
$payments = Payment::getPaymentsCount();
$months = Payment::getMonths();
$epercent = Payment::earningPercentage();
$earning = Payment::getMonthlyEarning();
$revenue = Payment::totalRevenue();
$rpercent = payment::revenuePercentage();
$mearning = Payment::getPaymentsMonth();
return $this->render('dashboard', ['dataProvider' => $DataProvider, 'events' => $events, 'journals' => $journals, 'photos' => $photos, 'wishlists' => $wishlists, 'RegisteredMembers' => $RegisteredMembers, 'orders' => $orders, 'payments' => $payments, 'months' => $months, 'epercent' => $epercent, 'earning' => $earning, 'revenue' => $revenue, 'rpercent' => $rpercent, 'mearning' => $mearning, 'famillies' => $famillies]);
}