Not sure what you are getting here:
{!! Form::file('image') !!}
Of course convert to form helper
since that's what you are using, but I usually store images in an image folder, in list page I have :
$linev = "";
$linev = "<td><a href=\"{$picpath}{$row->dogpic}\" target=\"_blank\">";
$linev = $linev . "<img width=\"80\" border=\"0\"";
$linev = $linev . "src=\"{$picpath}{$row->dogpic}\"></a></td>";
echo $linev;
Pic path is just:
$picpath = "upload/";
So in list view I am actually displaying the image.
However in the edit view I only show the image name:
<tr>
<td class="aright">dogpic:</td>
<td>
<input type="text" name="dogpic" id="dogpic" value="<?php echo $data->dogpic;?>">
</td>
</tr>
Again I don't know if you are storing images in a field or the images to a folder.
And by all means convert to form helper style, I have some code that I haven't converted yet, like the above.
But this does work.
After some searching i've discovered simply that's is not possibile in Php for security reasons.
This is allowed in a input text but not for the upload imagine. It needs a workaround, you have to create a preview of the image and with CSS hide the button's text "no image chosen" to let the user understand that the imagine is still in memory.
Thank you anyway
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community