fxcosta / laravel-chartjs

Simple package to facilitate and automate the use of charts in Laravel 5.x using Chartjs v2 library
486 stars 112 forks source link

Syntax Error??? #24

Closed justinwerner closed 7 years ago

justinwerner commented 7 years ago

Hey man, I got this working other than a syntax error.

" ~/fx3costa/laravelchartjs/src/Builder.php line 51: syntax error, unexpected ':', expecting ';' or '{' "

I am not sure if others are having this issue. What are your thoughts? The code looks clean to me first time run through. Maybe the issue is on my side. Line 51 is in the name($name) function.

private $types = [
    'bar',
    'doughnut',
    'line',
    'pie',
    'polarArea',
    'radar'
];

public function name($name): self
{
     $this->name = $name;
     $this->charts[$name] = $this->defaults;
     return $this;
}
ghost commented 7 years ago

Same