I have a form which let me enter expense and upload receipts for that expense. The form is ajaxed in a modal. So, there is a button "Add Expense", which on clicked will show the modal with the form ajax-ed
Normal File Input submission wont work. the other option is Ajax saving the receipts. The problem I have is since the Expense has not been created. How do I save ExpenseReceipt if I dont have expense_id ?
I am thinking to use http://plugins.krajee.com/file-input-ajax-demo/6
Below is my tables
Expense table
id
description
ExpenseReceipt table
id
expense_id
full_file_path