Laravel ORM查询数据库 两个字段不相等作为条件的 查询方法

$posts = Post::whereHas('comments', function ($query) {
$query->where('content', 'like', 'foo%');
$query->whereRaw('created_at!=updated_at');
})->get();

相关文章:

  • 2021-08-18
  • 2022-03-02
  • 2022-12-23
  • 2021-09-02
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案