Closed nunar closed 4 years ago
Since global string and array helpers are deprecated (Laravel news) this package isn't working anymore with newest versions of Laravel.
Proposed solution
use Illuminate\Support\Str; public function encodeArray($array) { $newArray = []; foreach ($array as $key => $val) { // Deprecated // $newArray[\camel_case($key)] = $this->encodeJson($val); // Use this directly $newArray[Str::camel($key)] = $this->encodeJson($val); } return $newArray; }
Another workaround since pull request is still open:
app/Http/Helpers.php
use Illuminate\Support\Str; if (!function_exists('camel_case')) { function camel_case($input) { return Str::camel($input); } }
Fixed with version 2.0.
Since global string and array helpers are deprecated (Laravel news) this package isn't working anymore with newest versions of Laravel.
Proposed solution
Another workaround since pull request is still open:
app/Http/Helpers.php