Skip to content

Commit a5f698f

Browse files
authored
Merge pull request #26 from nickknissen/patch-1
2 parents 9c6c3a1 + 7fcb74e commit a5f698f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Utils/Model.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace LasseRafn\Economic\Utils;
44

5+
use Illuminate\Support\Str;
6+
57
class Model
68
{
79
protected $entity;
@@ -20,7 +22,7 @@ public function __construct(Request $request, $data = [])
2022
$data = (array) $data;
2123

2224
foreach ($data as $key => $value) {
23-
$customSetterMethod = 'set'.ucfirst(camel_case($key)).'Attribute';
25+
$customSetterMethod = 'set'.ucfirst(Str::camel($key)).'Attribute';
2426

2527
if (!method_exists($this, $customSetterMethod)) {
2628
$this->setAttribute($key, $value);

0 commit comments

Comments
 (0)