Я строю систему загрузки нескольких изображений, и когда я начал загружать изображения и возвращал переменную $ image, он показывает мне только первый вход.
Я уже посмотрел на вопросы StackOverflow и не нашел ничего, что могло бы мне помочь
// get the images from the input file
$images = $request->file('g_images_thumbnails');
// loop throw the result
foreach ($images as $image) {
// return the image value
return $image;
}
// this to open the form
{!! Form::open(['action' => 'AdminBrowsergamesController@store', 'method' => 'POST', 'files' => true]) !!}
// this is the image upload input field
{!! Form::file('g_images_thumbnails[]',['class' => 'form-control', 'multiple', 'accept' => 'image/*']) !!}
// this is the submit button
{!! Form::submit('Submit',['class' => 'form-control btn btn-info w-50']) !!}
// this is the close form
{!! Form::close() !!}
он должен зацикливать все результаты и показывать их, но показывает только первый результат.