本文整理汇总了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);
}
示例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!');
}