title: Laravel view/controller design - ajax or form submit?
body: <p>This is probably a general Laravel/view/controller design question and whats the best approach for my use case. Here is my use case.</p>
  
  <p>Invoice Index View that has the following elements</p>
  
  <ol>
  <li><p>Two Select Boxes </p>
  
  <ul>
  <li>Customer List      </li>
  <li>Purchase Order List</li>
  </ul></li>
  <li><p>A Table for Invoices  </p></li>
  <li><p>A Button/href to Create a New Invoice</p></li>
  </ol>
  
  <p>Requirements:</p>
  
  <ul>
  <li>The customer list is populated with a list of customers from the backend(controller method)when I access the index view</li>
  <li>When the user selects a customer from the drop down, the Purchase Order List (in index view) has to be populated from the backend</li>
  <li>When the user selects a Purchase Order from the drop down then the Table(List) of Invoices(in index view) has to be populated (Requirement is a specific customer + purchase oder combination can have 0..N invoices)</li>
  <li>When the User Clicks on the Create New Invoice Button/Href(in index view)the view should be routed to a Create Invoice View(different view) that will have two text boxes(one for customer and the second for purchase order) pre-populated with the Selected Customer ID/Name, Purchase Order ID/name that was selected in the Index page/view.</li>
  </ul>
  
  <p>Given the above, what would be the approach I should follow</p>
  
  <ol>
  <li>Do I need to use AJAX and can Ajax satisfy all of the above or is this a good use case for AJAX</li>
  <li>Do I need to use a Form - where I have to handle the Purchase Order change event and button click event</li>
  <li>Most importantly, I would like to request for some examples to be provided on how this is done.</li>
  </ol>
  
  <p>Appreciate the advice and help. Thanks</p>