當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Helpers::getTotalInvestorBid方法代碼示例

本文整理匯總了PHP中Helpers::getTotalInvestorBid方法的典型用法代碼示例。如果您正苦於以下問題:PHP Helpers::getTotalInvestorBid方法的具體用法?PHP Helpers::getTotalInvestorBid怎麽用?PHP Helpers::getTotalInvestorBid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Helpers的用法示例。


在下文中一共展示了Helpers::getTotalInvestorBid方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: show

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id, $option = false)
 {
     if (strtolower(Session::get('account_type')) == 'admin') {
         $transactions = Mradiwallettransaction::where('user_id', $id)->orderBy('id', 'desc')->paginate(15);
         $myBalance = Helpers::investorBalance($id);
         $totalInvestorBid = Helpers::getTotalInvestorBid($id, false, true);
         return View::make('admin.pages.investor_transactions_admin')->with(compact('totalInvestorBid', 'myBalance'))->withObjects($transactions);
     } else {
         //get transactions of a single investor
         $transactions = Mraditransactionlog::find($id);
         // show the view and pass the investor transactions to it
         return View::make('admin.pages.jambo_form')->withObjects($transactions);
     }
 }
開發者ID:centaurustech,項目名稱:bmradi,代碼行數:20,代碼來源:WalletController.php

示例2: number_format

                <input type="text" name="subscribers_email" class="form-control" placeholder="Email Address" style="height:30px;">               
                <span class="input-group-btn">
                    <button class="btn btn-default" type="submit" style="height:30px; padding-top: 1px">Subscribe Newsletter</button>
                </span>
                
            </div></div></center></div>

<div class="video_spacer"></div>
<div id="sticky-anchor"></div>
<?php 
include 'common/headerB.php';
?>


<center><h1 style="color: #57A0C9; font-size: 40px; font-family: 'Kirvy-regular'; clear: both;">Over <b>KES <?php 
echo number_format(Helpers::getTotalInvestorBid("guest")->sum('Amount'), 2);
?>
</b> Raised</h1></center>


<!--<div style='height: 720px;'></div> -->
<div style="width: 100%; clear: both; background: url('<?php 
echo url();
?>
/media/img/xcx.jpg') no-repeat; padding: 20px; margin-top: 30px">   
    <div class="jumbotron center-block" style='border-top: 1px #ccc solid; clear: both; width: 70%; background-color: #96864C; background-color: rgba(252, 228, 106, 0.8); padding: 20px;  margin-top: 30px;'>
        <h3 style='color: #fff;' class="mradi_header">Mradifund</h3>
        <p class="lead" style='font-size: 1.1em;  color: #000000; '>
            <span style=""><b>Mradifund is an online fundraising platform. We connect small business owners with investors who provide the expansion
                    capital and mentorship they need to get to the next level. <br />At the same time, we give investors an opportunity to hand pick  
                    small companies to privately invest it, allowing them to diversify their portfolios and find the next big thing before it 
開發者ID:centaurustech,項目名稱:bmradi,代碼行數:31,代碼來源:index4.php

示例3: getList

    public function getList($status = false)
    {
        //get all bids
        // load the view and pass the all transactions
        $status = e(Input::get('categories_list'));
        if ($status == "" || $status == "All") {
            $condition = "";
        } else {
            $condition = " where tbl_campaigns.campaignstatus = '" . $status . "'";
        }
        if (strtolower(Session::get('account_type')) == 'admin') {
            $transactions = DB::select(DB::raw('select mcb.*, drv.*, tbl_campaigns.campaignstatus from mradicampaignbids mcb
							inner join
							(SELECT campaign_id as cid, count(id) as count, max(total_bidded) as totalBid, max(updated_at) as last_bid
							from mradicampaignbids group by campaign_id order by id desc) drv
							on mcb.campaign_id = drv.cid
							inner join tbl_campaigns on mcb.campaign_id = tbl_campaigns.uniqueid
							' . $condition . '
							group by mcb.campaign_id'));
            $pageNumber = Input::get('page', 1);
            $perpage = 15;
            $slice = array_slice($transactions, $perpage * ($pageNumber - 1), $perpage);
            $transactions = Paginator::make($slice, count($transactions), $perpage);
        } elseif (strtolower(Session::get('account_type')) == 'entrepreneur') {
            $con = "where " . strtolower(Session::get('account_type')) . "_id = " . Session::get('account_id');
            $transactions = DB::select(DB::raw('select mcb.*, drv.*, tbl_campaigns.campaignstatus from mradicampaignbids mcb 
							inner join
							(SELECT campaign_id as cid, count(id) as count, max(total_bidded) as totalBid, max(updated_at) as last_bid
							from mradicampaignbids ' . $con . ' group by campaign_id order by id desc) drv
							on mcb.campaign_id = drv.cid
							inner join tbl_campaigns on mcb.campaign_id = tbl_campaigns.uniqueid
							' . $condition . '
							group by mcb.campaign_id'));
            $pageNumber = Input::get('page', 1);
            $perpage = 15;
            $slice = array_slice($transactions, $perpage * ($pageNumber - 1), $perpage);
            $transactions = Paginator::make($slice, count($transactions), $perpage);
        } else {
            //$transactions = Mradicampaignbid::where(strtolower(Session::get('account_type')).'_id', Session::get('account_id'))->orderBy('id','desc')->paginate(15);
            $con = "where " . strtolower(Session::get('account_type')) . "_id = " . Session::get('account_id');
            $transactions = DB::select(DB::raw('select mcb.*, drv.*, tbl_campaigns.campaignstatus from mradicampaignbids mcb 
							inner join
							(SELECT campaign_id as cid, count(id) as count, max(total_bidded) as totalBid, max(updated_at) as last_bid
							from mradicampaignbids ' . $con . ' group by campaign_id order by id desc) drv
							on mcb.campaign_id = drv.cid
							inner join tbl_campaigns on mcb.campaign_id = tbl_campaigns.uniqueid
							' . $condition . '
							group by mcb.campaign_id'));
            $pageNumber = Input::get('page', 1);
            $perpage = 15;
            $slice = array_slice($transactions, $perpage * ($pageNumber - 1), $perpage);
            $transactions = Paginator::make($slice, count($transactions), $perpage);
        }
        $totalInvestorBid = Helpers::getTotalInvestorBid(Session::get('account_id'));
        $totalOnlineBid = Helpers::getTotalInvestorBid(Session::get('account_id'), true);
        $myBalance = Helpers::investorBalance(Session::get('account_id'));
        return View::make('admin.pages.campaign_bids')->with(compact('totalInvestorBid', 'myBalance', 'totalOnlineBid'))->withObjects($transactions);
    }
開發者ID:centaurustech,項目名稱:bmradi,代碼行數:58,代碼來源:BidController.php


注:本文中的Helpers::getTotalInvestorBid方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。