我发现了这个。
在Laravel的Eloquent ORM中,你可以像上面那样在where语句中追加表格行名吗?
在看到这个之前,我只会写:
例如:
$user = User::whereConfirmationCode($confirmation_code)->first();
在Laravel的Eloquent ORM中,你可以像上面那样在where语句中追加表格行名吗?
在看到这个之前,我只会写:
例如:
$user = User::where('confirmation_code', '=', $confirmation_code)->first();
谢谢
\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php
文件的第2108行开始,然后调用dynamicWhere
函数,在那里独角兽和彩虹一起欢庆。 - MysteryoswhereConfirmationCode
方法。 - Amit Shah