I use a select2 widget (multiple) and when i select more than 1 values, my query below doesn't work.
protected function value()
{
$range = $this->sibling("DateRangeBox")->value();
$program = $this->sibling("MultiProgramBox")->value(); //this is the select2 widget
return MYDB::table("mytable1")->count()
->leftjoin('mytable2', 'mytable1.id', '=', 'mytable2.id')
<....other mysql query here....>
->where("mytable2.program", 'like', $program) //i also tried wherein...
->whereBetween("mytable2.date", $range) //this works fine
->run()->getScalar();
}
I think it is something with arrays.. i saw some forum articles but i can't implement the suggestions in dashboard package. Can you help?