samedi 26 mai 2018

Laravel Code into Javascript?

I am using dropzone.js in my Laravel App to upload images. The Code looks like this:

<script>
Dropzone.options.myDropzone = {
    paramName: 'file',
    maxFilesize: 5, // MB
    maxFiles: 20,
    acceptedFiles: ".jpeg,.jpg,.png,.gif",
};
</script>

I want to make "maxFiles" more dynamic and load it with data from database. I have a table "cat" where field "count" is populated with a number. I can show the number using

$cat->count

I tried with

maxFiles: $cat->count - not working
maxFiles:  - not working

Can someone advice me how to solve this issue?

Kind Regards,

Stefan



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire