Skip to content
Advertisement

Laravel 8: Undefined offset error message

I’m working with Laravel Controllers:

JavaScript

When I fill the form that comes with this Controller I get this message:

ErrorException Undefined offset: 300

From this line:

JavaScript

So what is the problem here?

Advertisement

Answer

The problem is probably this line:

$image[$size] = $imagePath . "{$size}" . $filename;

it should be:

$images[$size] = $imagePath . "{$size}" . $filename;

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement