Public Ticket #1174943
Problem merging graphs or anything else


  • aigelbs0 started the conversation


    We're trying to use different combinations of widgets or something else. However, when we include all javascripts and css in our view, all animations or widgets crashes. Is there anything that we should know, about javascript order of import, or something else? 

    Hope I was clear.

    Thank you very much.

  • aigelbs0 replied

    Other thing we cannot do is upload files by the Advance Upload Files. When we click on upload files it apperars the next error. Hoewever, I need to send all files to the controller of my app. So, how can we do it?


    Attached files:  Captura de pantalla 2017-05-17 a la(s) 9.49.32 p.m..png

  •  75
    Jyostna replied


    Regarding widgets, both widgets pages have common css, so the css won't be the problem.

    But you might have to include the css and js of plugins as needed.

    Also the count up plugin we have used will throw errors if the element to count up is not present in the page. So make sure the elements in the following code are present in html or remove the js for the element.


    new CountUp("widget_count1", 0, 2436, 0, 2.5, options).start();

    if element with id="widget_count1" is not present in html remove the line in js.

    this should fix widgets issues.

    Regarding the upload issue:

    We do not give any code for uploading files, you have to write your custom code to upload files.

    Thank you.

  • aigelbs0 replied

    Ok. Perfect! We're going to try it. In the upload files I understand that you don't give any code. However is useless in the way it is implemented because when we receive the form, it doesn't contain the files. I think there is a middle step in this upload. If you can give us the specific library so we can search it online and understand how is working, we will appreciate. 

    Thanks again.

  •  75
  •  2
    hbmaddog replied

    Here is what worked for me...note that you need to set the route (in my case uploads/store) in routes/web.php

    Route::resource('uploads/store', 'UploadsController');

    In the controller...store method, you need to handle how you want to store the files

    dd($request->file('files')); will give you some hints

    $files = $request->file('files');

                foreach ($files as $file) {
                    $new_id = $upload->create($request->except('files', 'file_id'));
                    $upload_path = 'public/uploads/' . $new_id->id;
                    $path = $file->store($upload_path);

    For the view...

    <input id="files" name="files[]" type="file" multiple class="file-loading">

    //then handle the fileinput POST...

    Notice the _token...that part took a little time to figure out that we needed to pass that as the uploadExtraData


            showUpload: true,
            previewFileType: "any",
            theme: "fa",
            uploadExtraData: {
                "_token": "{{ csrf_token() }}",
                "model_type": "{{ $model_text }}",
                "model_id": "{{ $model->id }}",
            uploadUrl: "uploads/store", 
            uploadAsync: true,
            browseOnZoneClick: true,
            showBrowse: false,
            previewFileIconSettings: {
                'docx': '<i class="fa fa-file-word-o text-primary"></i>',
                'xlsx': '<i class="fa fa-file-excel-o text-success"></i>',
                'pptx': '<i class="fa fa-file-powerpoint-o text-danger"></i>',
                'jpg': '<i class="fa fa-file-photo-o text-warning"></i>',
                'pdf': '<i class="fa fa-file-pdf-o text-danger"></i>',
                'zip': '<i class="fa fa-file-archive-o text-muted"></i>',
            {{-- initialPreview: upload_paths,
            initialPreviewAsData: true,
            initialPreviewConfig: upload_configs --}}
        }).on("filebatchselected", function(event, files) {
        // trigger upload method immediately after files are selected


  •  52
    seenu replied

    Glad to know and thanks for posting solution here.