Hi, I hope someone can help me with this. Thanks in advance.
I am trying to use the timeline chart format, but I am getting: ""Undefined variable: toFormat (View: C:\dev-test\laravel\resources\views\report.blade.php)"" It seems the code is breaking on the line:
if ($date) {
return "new Date(" . \DateTime::createFromFormat($format, $value)->format($toFormat) . ")";
}
The setup is very straight forward, returning just a name and dates from Mysql.
$this->src('mysql')
->query("
select concat(Prefix, ' ' ,name) as name, startDate, endDate
from tours
where startDate >= CURDATE()
")
->pipe($this->dataStore("toursTimeline"));
In the view, I tried with
"dataStore" => $this->dataStore('toursTimeline'),
and
"dataSource" => $this->dataStore("toursTimeline"),
to see if it made any difference. But I was still getting the same error.
both startDate and endDate are defined as dates in MySQL.
Thank you