当前位置: 首页>>代码示例>>PHP>>正文


PHP EmailTemplate::where方法代码示例

本文整理汇总了PHP中EmailTemplate::where方法的典型用法代码示例。如果您正苦于以下问题:PHP EmailTemplate::where方法的具体用法?PHP EmailTemplate::where怎么用?PHP EmailTemplate::where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EmailTemplate的用法示例。


在下文中一共展示了EmailTemplate::where方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: insertPoolingSchedule

 public function insertPoolingSchedule($contact_id, $member_id, $template_id)
 {
     $contactTarget = Contact::find($contact_id);
     $memberTarget = User::find($member_id);
     $templateTarget = EmailTemplate::where('sequence', $template_id)->first();
     // return $templateTarget->id;
     if (!$contactTarget || !$memberTarget || !$templateTarget) {
         return null;
     }
     $stag = new EmailSchedullerPool();
     $stag->contact_id = $contact_id;
     $stag->member_id = $member_id;
     $stag->template_id = $template_id;
     // $configurationMember = MemberConfiguration::where('member_id',$member_id)->where('param_code',MemberConfiguration::FOLLOW_UP_SEQUENCE)->first();
     // if(!$configurationMember){
     //       	return null ;
     // }
     // $followUpSequence = $configurationMember->param_value;
     $followUpSequence = Sysparam::getValue('conf_follow_up_date');
     $stag->execution_date = date('Y-m-d H:i:s', strtotime("+" . $followUpSequence . " day"));
     $emailSchedullerPool = EmailSchedullerPool::where('member_id', $member_id)->where('contact_id', $contact_id)->where('template_id', $template_id)->first();
     if ($emailSchedullerPool) {
         //save history
         $this->saveHistory("canceled", $emailSchedullerPool->member_id, $emailSchedullerPool->template_id);
         //delete pool
         $emailSchedullerPool->delete();
     }
     //add entry
     if ($contactTarget->active && $memberTarget->active) {
         $stag->save();
         return $stag->toJson();
     } else {
         return null;
     }
 }
开发者ID:arbuuuud,项目名称:gnt-aops,代码行数:35,代码来源:Contact.php

示例2: sharedTemplates

 /**
  * sharedTemplates()
  * Returns a query object of all the shared templates by default excluding the shared templates authored by the current user.
  * @param bool $showall
  * @return mixed
  */
 public static function sharedTemplates($showall = FALSE)
 {
     if ($showall) {
         $query = EmailTemplate::where('public', '=', '1')->orderBy('name', 'ASC')->get();
     } else {
         $query = EmailTemplate::where('public', '=', '1')->where('author', '!=', Auth::consoleuser()->get()->cid)->orderBy('name', 'ASC')->get();
     }
     return $query;
 }
开发者ID:A-Lawrence,项目名称:VASOPS,代码行数:15,代码来源:EmailTemplate.php

示例3: post_emailtemplatedelete

 public function post_emailtemplatedelete()
 {
     //Get our id
     $id = Input::get('id');
     //Verify that the id is valid and the template is owned by the member trying to delete it or they are level 1 access
     if (Auth::consoleuser()->get()->access > 0) {
         $query = EmailTemplate::where('id', '=', $id)->count();
     } else {
         $query = EmailTemplate::where('id', '=', $id)->where('author', '=', Auth::consoleuser()->get()->cid)->count();
     }
     if ($query > 0) {
         //Count is greater than 0 let's delete the record;
         EmailTemplate::where('id', '=', $id)->delete();
     }
 }
开发者ID:A-Lawrence,项目名称:VASOPS,代码行数:15,代码来源:ConsoleController.php


注:本文中的EmailTemplate::where方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。