I want to get two queues into one.
$buildings_queue=IngameBuildingQueue::where(DB::raw('UNIX_TIMESTAMP(`start_time` + `duration`)'),'<=',time());
$recruit_queue=IngameRecruitQueue::where(DB::raw('UNIX_TIMESTAMP(`start_time` + `duration`)'),'<=',time());
$queue=$buildings_queue->unionAll($recruit_queue);
dd($queue->toSql());
Laravel throw:
[ErrorException] Undefined property: Illuminate\Database\Eloquent\Builder::$bindings
but when I delete where()
methods everything works fine.
How can I fix it?