Skip to content

Commit a687345

Browse files
authored
Merge pull request #86 from wells/fix-laravel-6
Update to support Arr::get and Arr::set usage in Laravel 6
2 parents e1783dd + b072fe0 commit a687345

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Builder.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* This file is inspired by Builder from Laravel ChartJS - Brian Faust
55
*/
66

7+
use Illuminate\Support\Arr;
8+
79
namespace Fx3costa\LaravelChartJs;
810

911
class Builder
@@ -163,7 +165,7 @@ public function render()
163165
*/
164166
private function get($key)
165167
{
166-
return array_get($this->charts[$this->name], $key);
168+
return Arr::get($this->charts[$this->name], $key);
167169
}
168170

169171
/**
@@ -174,7 +176,8 @@ private function get($key)
174176
*/
175177
private function set($key, $value)
176178
{
177-
array_set($this->charts[$this->name], $key, $value);
179+
Arr::set($this->charts[$this->name], $key, $value);
180+
178181
return $this;
179182
}
180183
}

0 commit comments

Comments
 (0)