本文整理汇总了PHP中Helpers::getTotalInvestment方法的典型用法代码示例。如果您正苦于以下问题:PHP Helpers::getTotalInvestment方法的具体用法?PHP Helpers::getTotalInvestment怎么用?PHP Helpers::getTotalInvestment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Helpers
的用法示例。
在下文中一共展示了Helpers::getTotalInvestment方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBidCampaign
public function getBidCampaign($campaignID)
{
$campaign = Helpers::getCampaignSummary($campaignID);
//total investment sought
$totatInvestment = Helpers::getTotalInvestment($campaignID);
$cValue = $totatInvestment[0]->total_investment;
//bidding done
$myBid = Helpers::getTotalBidded($campaignID);
$totalBid = $myBid ? $myBid->total_bidded : '0';
//investor balance
$user_id = Session::get('account_id');
$investor_balance = Helpers::investorBalance($user_id);
if (\Request::ajax()) {
return View::make('admin.pages.bidder', compact('campaign', 'campaignID', 'cValue', 'totalBid', 'investor_balance'));
}
}
示例2:
</div>
<div style="height:220px; background-color: #fff; padding-top: 5px; margin-left: 300px">
<?php
if (strtolower(Helpers::getCampaignStatus($campaign)->campaignstatus) == 'ongoing' || strtolower(Helpers::getCampaignStatus($campaign)->campaignstatus) == 'closed') {
?>
<section class="content-header"> <h1>{{Helpers::getCampaignID($campaign,true)}}</h1> </section>
<h4>{{Campaign::getTotalViews($campaign)}} Views</h4>
<span style="width:40% !important;">
<?php
//total amount bidded
$myBid = Helpers::getTotalBidded($campaign);
$totalBid = $myBid ? $myBid->total_bidded : '0';
//campaign value
$investment = Helpers::getTotalInvestment($campaign);
$campaignValue = $investment ? $investment[0]->total_investment : 0;
//$percentage_share_completion = ($item->share_bought * 100) / $item->no_of_shares;
$percentage_share_completion = $totalBid * 100 / $campaignValue;
?>
<div class="progress" style="width: 40%; text-align: center; ">
<div class="progress-bar progress-bar-green" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: <?php
echo $percentage_share_completion;
?>
%;">
<span class="sr-only" style="position: relative !important;"><?php
echo $percentage_share_completion;
?>
% Complete</span>
</div>
示例3: foreach
</div> -->
<div class="row featured_campaign_holder">
<div class="row center-block" style=" width: 1000px; text-align: center; margin: 0 auto;">
<?php
$recent_campaigns = Campaign::get_campaigns("guest");
//$recent_campaigns = Campaign::get_recent_campaigns(3);
//dd($recent_campaigns);
foreach ($recent_campaigns as $item) {
//total amount bidded
$myBid = Helpers::getTotalBidded($item->uniqueid);
$totalBid = $myBid ? $myBid->total_bidded : '0';
//campaign value
$investment = Helpers::getTotalInvestment($item->uniqueid);
$campaignValue = $investment ? $investment[0]->total_investment : 0;
//$percentage_share_completion = ($item->share_bought * 100) / $item->no_of_shares;
$percentage_share_completion = $totalBid * 100 / $campaignValue;
//echo $percentage_share_completion; exit;
?>
<div class='temp_one_index_campaign_holder' style="height: auto !important;">
<?php
$file = Helpers::getUploadedFileDetails($item->listing_logo);
if (empty($file)) {
$image = 'no-image.png';
} else {
$image = $file[0]->file_alias;
}
echo HTML::image("/assets/{$image}", $item->campaigname . ' campaign logo', array("height" => "180px", "width" => "100%"));
示例4: show
/**
* Display the specified resource.
*
* @param int $id
* @return Response
*/
public function show($campaign_id)
{
$transactions = Mradicampaignbid::where('campaign_id', $campaign_id)->orderBy('id', 'desc')->paginate(15);
//total amount bidded
$myBid = Helpers::getTotalBidded($campaign_id);
$totalBid = $myBid ? $myBid->total_bidded : '0';
//campaign value
$investment = Helpers::getTotalInvestment($campaign_id);
$campaignValue = $investment ? $investment[0]->total_investment : 0;
//no of investors
$investorCount = $transactions->count();
//online bids
$totalOnlineBid = Helpers::getTotalInvestorBid(Session::get('account_id'), true);
return View::make('admin.pages.campaign_bid_view')->with(compact('campaign_id', 'totalBid', 'campaignValue', 'investorCount', 'totalOnlineBid'))->withObjects($transactions);
}