Skip to content

Commit

Permalink
Merge pull request #86 from wells/fix-laravel-6
Browse files Browse the repository at this point in the history
Update to support Arr::get and Arr::set usage in Laravel 6
  • Loading branch information
fxcosta authored Oct 10, 2019
2 parents e1783dd + b072fe0 commit a687345
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* This file is inspired by Builder from Laravel ChartJS - Brian Faust
*/

use Illuminate\Support\Arr;

namespace Fx3costa\LaravelChartJs;

class Builder
Expand Down Expand Up @@ -163,7 +165,7 @@ public function render()
*/
private function get($key)
{
return array_get($this->charts[$this->name], $key);
return Arr::get($this->charts[$this->name], $key);
}

/**
Expand All @@ -174,7 +176,8 @@ private function get($key)
*/
private function set($key, $value)
{
array_set($this->charts[$this->name], $key, $value);
Arr::set($this->charts[$this->name], $key, $value);

return $this;
}
}

0 comments on commit a687345

Please sign in to comment.