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



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2sf4xms
via IFTTT

Aucun commentaire:

Enregistrer un commentaire