title: Laravel 5.3 Database Update From Button Click
body: <p>So I'm building an app to monitor tasks / jobs. Each job has a status and the default is "1". If it has been finished, the user will click a button, which will change the status to "2", meaning it's done. However, I haven't been successful so far and I will be needing your help.</p>
  
  <p>So far, this is what I have done</p>
  
  <p>The button link:</p>
  
  <pre><code>&lt;p&gt;
  {{ link_to('job/detail/' . $job-&gt;id, 'Finish Task', ['class' =&gt; 'btn btn-primary btn-lg']) }}
  &lt;/p&gt;
  </code></pre>
  
  <p>The controller:</p>
  
  <pre><code>public function finish($id)
  {
     $job = Job::findOrFail($id);
     $job-&gt;update(['status' =&gt; '2']);
  }
  </code></pre>
  
  <p>And finally, my route, which I have the biggest doubt. Because I might have two conflicting routes</p>
  
  <pre><code>Route::get('job/detail/{job}', 'JobController@show');
  Route::put('job/detail/{job}', 'JobController@finish');
  </code></pre>
  
  <p>I didn't use any form, and I wanted to do the update right from the button click. Is that possible?</p>
  
  <p>Thanks for the answers</p>