title: How to call Laravel controller function from JavaScript
body: <p>How i can call controller function using JavaScript !?</p>
  
  <p>Controller:</p>
  
  <pre><code>public function archive($id)
  {
    $article = Article::find($id);
  
    $article-&gt;public = 0;
    $article-&gt;archive = 1;
  
    $article-&gt;save();
  }
  </code></pre>
  
  <p>Route:</p>
  
  <pre><code>Route::post('/archive/{id}', 'HomeController@archive');
  </code></pre>
  
  <p>I would be grateful for any working options. Thank you!</p>