title: Send order of jQuery sortable to Laravel controller
body: <p>I have a collection of <code>Article</code> objects that have a public attribute <code>int priority</code>. This field ist used to display the articles in the intended order. However, I'd like to be able to rearrange the order of the articles in the admin area.</p>
  
  <p>I included jQuery and with this Laravel/Blade snippet</p>
  
  <pre><code>&lt;ul class="selectable-demo-list" id="sortable-list-basic"&gt;
      @FOREACH($articles as $article)
          &lt;li&gt; {{ $article-&gt;label}} &lt;/li&gt;
      @ENDFOREACH
  &lt;/ul&gt;
  </code></pre>
  
  <p>I can produce this HTML output:</p>
  
  <pre><code>&lt;ul class="selectable-demo-list" id="sortable-list-basic"&gt;
      &lt;li&gt; My article (ID: 1) &lt;/li&gt;
      &lt;li&gt; Another article (ID: 2) &lt;/li&gt;
      &lt;li&gt; ... &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I can access the respective priority via <code>$article-&gt;priority</code> and their unique IDs via <code>$article-&gt;id</code> if these elements should be included in the code.</p>
  
  <p>The <code>&lt;ul&gt;</code> posted above is rendered correctly: All <code>&lt;li&gt;</code> elements are displayed as sortable jQuery elements. If I drag an item to a certain position, it stays there for the time being.</p>
  
  <p>Unfortunately, I have no idea how to save the new order (= update the items priorities according to the list positions). </p>
  
  <p>This shouldn't be done directly. Instead, I want to use an update button. Maybe I can use a form and send an array like this to my controller:</p>
  
  <pre><code>$priorities = [1=&gt;3; 2=&gt;1; 3=&gt;2] // ID =&gt; new priority
  </code></pre>
  
  <p>Is this possible? Or should I use a different approach? Any help is greatly appreciated!</p>