->where([
'er.id_user_request_to' => $nIdUser
])
->where(DB::raw('case WHEN ge.id_user IS NOT NULL THEN ge.id_user = '.$nIdUser.' ELSE 0 END'))
Run Code Online (Sandbox Code Playgroud)
尝试使用以下代码打印查询
$qry = vsprintf(str_replace(array('%', '?'), array('%%', '"%s"'), $oEvents->toSql()), $oEvents->getBindings());
dd($qry);
Run Code Online (Sandbox Code Playgroud)
这会打印一个查询,如
WHERE
(
`er`.`id_user_request_to` = "6")
AND(
CASE WHEN ge.id_user IS NOT NULL THEN ge.id_user = 6 ELSE 0 END
)
) **IS NULL**
Run Code Online (Sandbox Code Playgroud)
没有从它在查询结束时添加IS NULL 的地方获取
我正在使用 laravel Mailable 和 Markdown 发送电子邮件,但它发送了一封如下所示的电子邮件,没有得到我做错了什么。
Hello cus1
Please click the button below to verify your email address.
<table class="action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td>
<a href="https://google.com" class="button button-primary"
target="_blank">Verify Email Address</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
If you did not create an account, no further action is required.
Thanks,<br>
PMS
Run Code Online (Sandbox Code Playgroud)
下面是我welcome_email.blade.php用来生成电子邮件模板的
@component('mail::message')
# Hello {{ …Run Code Online (Sandbox Code Playgroud)