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


PHP Emails::all方法代码示例

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


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

示例1: getAsap

    public function getAsap()
    {
        $records = Emails::all();
        foreach ($records as $record) {
            $receive_alert = $record->receive_alert;
        }
        if ($receive_alert = 'ASAP') {
            $records = Emails::where('receive_alert', $receive_alert)->get();
            foreach ($records as $record) {
                $id = $record->user_id;
                $emls = User::where('id', $id)->get();
                foreach ($emls as $eml) {
                    $adr = $eml->email;
                }
                $property = Profolio::where('asap', 1)->get();
                if ($property->isEmpty()) {
                    echo "no property added";
                } else {
                    $to = $adr;
                    $subject = 'New property Add on zameen jayedad';
                    $message = null;
                    foreach ($property as $propertys) {
                        $message .= '<html>
			
			<body>
			<table width="740px;" class="MsoTableLightShadingAccent1" border="1"  cellspacing="0" cellpadding="0" style="color:#333; border-collapse:collapse;border:none; font-family: Helvetica, Arial, sans-serif; text-align: center; width=740px;">
           
			<tr>
			<td align="center" width="250px;" style="border: 1px solid #333; width=150px; transition: all 0.3s; background: #FAFAFA; text-align: center; " ><b> App Type </b></td>
			<td align="center" style="border: 1px solid #333; width=370px; transition: all 0.3s; background: #FAFAFA; text-align: center; " >' . $propertys->property_type . '</td>
			</tr>

			<tr>
			<td align="center" width="250px;" style="border: 1px solid #333; width=150px; transition: all 0.3s; background: #FAFAFA; text-align: center; " ><b> purpose </b></td>
			<td align="center" style="border: 1px solid #333; width=370px; transition: all 0.3s; background: #FAFAFA; text-align: center; " >' . $propertys->purpose . '</td>
			</tr>
			<tr>
			<td align="center" width="250px;" style="border: 1px solid #333; width=150px; transition: all 0.3s; background: #FAFAFA; text-align: center; " ><b> Address </b></td>
			<td align="center" style="border: 1px solid #333; width=370px; transition: all 0.3s; background: #FAFAFA; text-align: center; " >' . $propertys->location . '</td>
			</tr>
			<tr>
			<td align="center" width="250px;" style="border: 1px solid #333; width=150px; transition: all 0.3s; background: #FAFAFA; text-align: center; " ><b> photo </b></td>
			<td align="center" style="border: 1px solid #333; width=370px; transition: all 0.3s; background: #FAFAFA; text-align: center; " ><img width="200" height="150" src="http://zameenjayedad.com.pk/uploads/photos/' . $propertys->photo . '"</td>
			</tr>
			<tr>
			<td align="center" width="250px;" style="border: 1px solid #333; width=150px; transition: all 0.3s; background: #FAFAFA; text-align: center; " ><b> App Logo </b></td>
			<td align="center" style="border: 1px solid #333; width=370px; transition: all 0.3s; background: #FAFAFA; text-align: center; " > <a href="http://zameenjayedad.com.pk/dashboard/listing/guest/' . $propertys->id . '">Detail</a></td>
			</tr>
          
			
			
			</table>
			</body>
			</html> <br/>';
                    }
                    // $URL ='Property type :'.$propertys->property_type.'<br/>'.'purpose :'.$propertys->purpose.'<br/>'.'location :'.$propertys->location.'<br/>'
                    //                 .'budget :'.$propertys->budget.'Area :'.$propertys->l_area.'<br/>'.'Contact Person :'.$propertys->contact_p.'<br/>'
                    //                 .'Cell Num :'.$propertys->cell.'<br/>'.'Email :'.$propertys->email;
                    //  $this->sendTo($adr,array('activationCode'=>$URL));
                    $headers = "From: " . strip_tags('zameenjayedad.com') . "\r\n";
                    $headers .= "Reply-To: " . strip_tags('zameenjayedad.com') . "\r\n";
                    $headers .= "MIME-Version: 1.0\r\n";
                    $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
                    mail($to, $subject, $message, $headers);
                    DB::table('property')->where('asap', 1)->update(array('asap' => 0));
                }
            }
        }
    }
开发者ID:omusico,项目名称:zameenJayedad,代码行数:69,代码来源:EmailController.php


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