Skip to content

Commit 2d63bfe

Browse files
committed
bug fixed for laravel 6
1 parent cce90ab commit 2d63bfe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/HasImageUploads.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace QCod\ImageUp;
44

55
use Illuminate\Support\Arr;
6+
use Illuminate\Support\Str;
67
use Intervention\Image\Facades\Image;
78
use Illuminate\Support\Facades\Storage;
89
use Illuminate\Contracts\Validation\Factory;
@@ -455,7 +456,7 @@ protected function getImageUploadPath()
455456
protected function getFileUploadPath($file)
456457
{
457458
// check if path override is defined for current file
458-
$pathOverrideMethod = camel_case(strtolower($this->uploadFieldName) . 'UploadFilePath');
459+
$pathOverrideMethod = Str::camel(strtolower($this->uploadFieldName) . 'UploadFilePath');
459460

460461
if (method_exists($this, $pathOverrideMethod)) {
461462
return $this->getImageUploadPath() . '/' . $this->$pathOverrideMethod($file);

0 commit comments

Comments
 (0)