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


PHP Config::find方法代碼示例

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


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

示例1: handle

 public function handle($request, Closure $next)
 {
     $today = Carbon::now('Asia/Manila');
     $report_date = Config::find(1);
     // Send a report if today is not set to our config table
     if ($report_date->report_date->day != $today->day || $report_date->report_date->month != $today->month || $report_date->report_date->year != $today->year) {
         $report_date->report_date = $today;
         $report_date->save();
         $deadline_names = [];
         $i = new \App\Info();
         foreach (\App\Info::all() as $info) {
             $deadline = $i->isDeadLineToday($info->dead_line);
             if ($deadline == 'deadline' && $info->claim_status != 'approved') {
                 $deadline_names[$info->name] = $info;
             }
         }
         $data = array('data' => $deadline_names);
         \Log::info('Sending mail....');
         \Mail::send('email.email', $data, function ($message) {
             $message->from('ovejera.jimpaulo@gmail.com', 'GIBX Internal System');
             $date = \Carbon\Carbon::today('Asia/Manila')->format('d/m/Y');
             $recipients = ['f360.jovejera@gmail.com', 'ddcruz@gibco.guevent.com', 'fvgazzingan@f360.guevent.com', 'foalcazar@f360.guevent.com', 'mlsantos@gibco.guevent.com', 'llcustodio@gibco.guevent.com', 'echavarria@guevent.com', 'ethel_chavarria@yahoo.com', 'paodelro@gmail.com', 'psdelrosario@gibco.guevent.com', 'domcruzged.am@gmail.com', 'ag@guevent.com'];
             $message->to($recipients)->subject('GIBX Claims System Daily Report ' . $date);
         });
         // TODO: Send an email for reporting here...
     }
     return $next($request);
 }
開發者ID:neutt22,項目名稱:claims-system,代碼行數:28,代碼來源:SendReportForToday.php

示例2: change

 /**
  * @author: lmkhang - skype
  * @date: 2016-01-12
  * Save Change
  */
 public function change(Request $request)
 {
     //Post
     $post = $request->all();
     //Trim
     $setting = $this->trim_all($post);
     foreach ($setting['id'] as $id) {
         //            echo $id. ' - '.$setting['setting_'.$id].'<br/>';
         $setting_get = \App\Config::find($id);
         $setting_get->value = $setting['setting_' . $id];
         $setting_get->save();
     }
     //set Flash Message
     $this->setFlash('message', 'Save successfully!');
     return redirect()->back()->with('message', 'Save successfully!');
 }
開發者ID:lmkhang,項目名稱:mcntw,代碼行數:21,代碼來源:Setting.php


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