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


PHP AppHelper::dateToString方法代碼示例

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


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

示例1: handleSearch

 public function handleSearch()
 {
     $getDate = Input::get('searchVoter');
     //echo $getDate;
     $getDate = AppHelper::dateToString($getDate);
     $results = DB::select('select membership_id FROM "valids" WHERE "valid"=1 and "upToDate" between 0  and ' . $getDate);
     return $results;
 }
開發者ID:BDMADE,項目名稱:DBA,代碼行數:8,代碼來源:AdminVoterController.php

示例2: currentDate

 public static function currentDate()
 {
     $currentDate = date('d-m-Y');
     $currentDate = AppHelper::dateToString($currentDate);
     return $currentDate;
 }
開發者ID:BDMADE,項目名稱:DBA,代碼行數:6,代碼來源:AppHelper.php

示例3: handleBankStatement

 public function handleBankStatement()
 {
     $account = Account::findOrFail(Input::get('account'));
     if (Input::get('bank_statement') == 1) {
         $account->bank_statement = Input::get('bank_statement');
         // store bank statement;
         $account->save();
         //update information to Valid table
         $member_id = $account->membership_id;
         //submit money to date
         $toDate = $account->to;
         //return $date;
         //converting date to srting
         $date = AppHelper::dateToString($toDate);
         //validateion upto date
         $upToDate = AppHelper::addThreeYear($toDate);
         //converting date to srting
         $upToDate = AppHelper::dateToString($upToDate);
         $currentDate = AppHelper::currentDate();
         //update valid database
         DB::update('update valids set valid=1,toDate =' . $date . ',upToDate=' . $upToDate . ' where membership_id=' . $member_id);
         if ($currentDate < $upToDate) {
             DB::update('update members set status=1 where membership_id=' . $member_id);
         }
         return Redirect::action('AdminAccountController@index')->with('flash_edit_success', 'Congratulation,You have submitted a bank statement');
     } else {
         return Redirect::action('AdminAccountController@index')->with('flash_dlt_success', 'Sorry, You do not submitted any bank statement.');
     }
 }
開發者ID:BDMADE,項目名稱:DBA,代碼行數:29,代碼來源:AdminAccountController.php


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