title: How to catch the Collection sortBy keyword to variable on laravel blade?
body: <p>On blade view .I resort my collection from controller
  like below</p>
  
  <pre><code>{{$search_alls=$search_alls-&gt;sortByDesc('id')}};
  </code></pre>
  
  <p>or</p>
  
  <pre><code>{{$search_alls=$search_alls-&gt;sortBy('id')}};
  </code></pre>
  
  <p>The above is work fine on my blade.</p>
  
  <p>I want to make a dynamic javascript button to change the keywork in the sortby  clause,or change sortBy to sobyByDesc. </p>
  
  <p>How can I catch the </p>
  
  <pre><code>-&gt;sortBy($keywordvariable) 
  </code></pre>
  
  <p>or catch the </p>
  
  <pre><code>-&gt;$sortclausevariable($keywordvariable)?
  </code></pre>
  
  <p>and how to  reload the new sequence $serch_alls? Can  by reload page javascript function?</p>