Laravel using UNION in query builder

自作多情 提交于 2019-12-08 11:27:25

Looks like your models are using Ardent, not Eloquent:

...instance of LaravelBook\Ardent\Builder given, ...

And probably this might be a problem on Ardent, not Laravel.

Open an issue here: https://github.com/laravelbook/ardent.

EDIT:

Try to change use QueryBuilder instead of Eloquent:

Use this for QueryBuilder:

DB::table('tags')->

Instead of the Eloquent way:

Tag::

I know you mentioned wanting to use the query builder, but for complex queries that the builder might throw fits on, you can directly access the PDO object:

$pdo = DB::connection()->getPdo();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!