Check GitHub for package that will print the images.
Jul 18, 2016
5
Level 2
Getting laravel to save images
I'm using dropzone.js to create a drag and drop section where I can save my images I've managed to be able to have it upload to the correct folder but the issue I'm having is that I'm not able to print my image when I user Print_r. When I use print_r I get a blank array.
My Controller
public function store(){
$input = Input::all();
$file = Input::file();
echo "<PRE>";
print_r($file);
die();
}
my create page
<!-- This gets the admin template from app/modules/templates/views -->
@extends('templates::layouts.admin')
<!-- This inserts the content below into the template -->
@section('content')
{{-- {{ Html::script('js/admin/menu.js') }} --}}
{{ Form::open(array('route' => 'admin.menus.store', 'class' => 'add-form')) }}
<div class="form">
<div class="title_input">
<div>
{{ Form::label('title', 'Title') }}
</div>
<div>
{{ Form::text('title','', array('id' => 'title', "class" => "form-control")) }}
</div>
</div>
<div class="dropzone" id="my-dropzone" name="mainFileUploader">
<div class="fallback">
<input name="file" type="file" multiple />
</div>
</div>
<script>
Dropzone.options.myDropzone = {
url: "{{ asset("uploads/upload.php?target=menu_images") }}",
};
</script>
<div class="submit_button">
<div>
{{ Form::submit('Submit', array("class" => "btn btn-info submit", "role" => "button")) }}
</div>
</div>
</div>
{{ Form::close() }}
@stop
Please or to participate in this conversation.