Если это класс livewire, у меня есть следующий код:
Код: Выделить всё
public function updated()
{
$agent = Agent::find($this->selectedAgentId);
$this->selectedAgentName = $agent->name;
$ext = $agent->getActiveExtByOccupancyDate($this->selectedDate)->id;
Log::info("Ext: " . $ext);
if ($ext) {
$this->activities = ExtensionStatus::where('extension_id', '=', (string) $ext)
->whereDate('fs_time', '=', $this->selectedDate)
->get();
Log::info($ext);
$this->agentActiveOnSelectedDate = $this->activities->count() > 0;
}
else
{
$this->agentActiveOnSelectedDate = false;
}
}
Код: Выделить всё
SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: character varying = integer LINE 1: ...agent_status" where "agent_status"."extension_id" in (2727, ... ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
select * from "agent_status" where "agent_status"."extension_id" in (2727, 2727, 2727)
РЕДАКТИРОВАТЬ: Пожалуйста, скажите мне, что не так с вопросом, прежде чем голосовать против, чтобы я мог его улучшить.
Подробнее здесь: https://stackoverflow.com/questions/793 ... into-array
Мобильная версия