I want to get two queues to 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?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire