3
3
namespace Basemkhirat \Elasticsearch ;
4
4
5
5
use Illuminate \Support \Collection ;
6
+ use Illuminate \Support \Str ;
6
7
7
8
/**
8
9
* Elasticsearch data model
@@ -179,7 +180,7 @@ public function __get($name)
179
180
*/
180
181
protected function getOriginalAttribute ($ name )
181
182
{
182
- $ method = "get " . ucfirst (camel_case ($ name )) . "Attribute " ;
183
+ $ method = "get " . ucfirst (Str:: camel ($ name )) . "Attribute " ;
183
184
$ value = method_exists ($ this , $ method ) ? $ this ->$ method ($ this ->attributes [$ name ]) : $ this ->attributes [$ name ];
184
185
return $ this ->setAttributeType ($ name , $ value );
185
186
}
@@ -191,7 +192,7 @@ protected function getOriginalAttribute($name)
191
192
*/
192
193
protected function getAppendsAttribute ($ name )
193
194
{
194
- $ method = "get " . ucfirst (camel_case ($ name )) . "Attribute " ;
195
+ $ method = "get " . ucfirst (Str:: camel ($ name )) . "Attribute " ;
195
196
$ value = method_exists ($ this , $ method ) ? $ this ->$ method (NULL ) : NULL ;
196
197
return $ this ->setAttributeType ($ name , $ value );
197
198
}
@@ -253,7 +254,7 @@ public function toJson($options = 0)
253
254
public function __set ($ name , $ value )
254
255
{
255
256
256
- $ method = "set " . ucfirst (camel_case ($ name )) . "Attribute " ;
257
+ $ method = "set " . ucfirst (Str:: camel ($ name )) . "Attribute " ;
257
258
258
259
$ value = method_exists ($ this , $ method ) ? $ this ->$ method ($ value ) : $ value ;
259
260
0 commit comments