本文整理匯總了PHP中common\models\Order::getCountByUserId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Order::getCountByUserId方法的具體用法?PHP Order::getCountByUserId怎麽用?PHP Order::getCountByUserId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類common\models\Order
的用法示例。
在下文中一共展示了Order::getCountByUserId方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
echo $model->statusMsg;
?>
</p>
<p>注冊日期:<?php
echo Yii::$app->formatter->asDatetime($model->created_at);
?>
</p>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="panel panel-primary">
<div class="panel-heading">統計數據</div>
<div class="panel-body">
<p>總訂單量:<?php
echo Order::getCountByUserId($model->id);
?>
</p>
</div>
</div>
</div>
</div>
<div class="panel panel-default hidden-xs">
<div class="panel-heading">近15天訂單生成統計表</div>
<div class="panel-body">
<div>
<?php
echo ChartJs::widget(['type' => 'Line', 'options' => ['height' => 40], 'clientOptions' => ['responsive' => true, 'tooltipTemplate' => '<%if (label){%><%=label%>: <%}%><%= value %>個'], 'data' => ['labels' => $last15days, 'datasets' => [['fillColor' => "rgba(151,187,205,0.5)", 'strokeColor' => "rgba(151,187,205,1)", 'pointColor' => "rgba(151,187,205,1)", 'pointStrokeColor' => "#fff", 'data' => $numDataOrder]]]]);
?>
</div>
</div>