php - Universal multiple file uploader for Laravel 5 -


i want create universal multiple file uploader, don't know approach should choose develop it.

i have attachment model , attachments table in database. have model item , table items. these 2 connected via item_attachment table (maybe morph connection in future, many models can have attachments).

i thought several approaches (examples create form item):

  • use js uploader (like dropzone) , develop separate controller handle uploads (attachmentscontroller). when upload files, controller return json response id's js, , inserted form hidden elements. after submitting form, attached item.

  • don't use js, , process uploads directly in itemscontroller.

  • don't use js, develop service, uploads handled , call it's methods in itemscontroller.

what can recommend? maybe have approach?

thanks


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -