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')); } }
{{HTML::image('assets/'.$file_name, $campaignSummary[0]->business_name.' logo',array("width"=>"250px","height"=>"200px","style"=>"border-radius: 10px;"))}} <!-- </div>--> </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;
<!-- <div class="center-block" style=" color: rgb(108, 194, 200); font-size: 40px; font-family: 'Kirvy-regular'; margin-top: 70px; text-align: center;"> <h2 class="bold_header">Featured Campaigns</h2> </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 {
/** * 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); }