title: Deleting a row in laravel via a button
body: <p>This question was asked a lot I know the posts that were posted helped me out a little bit and I have something like this right now.</p>
  
  <p>Controller:</p>
  
  <pre><code>public function destroy($delete)
  {
      $delete-&gt;delete();
      return redirect()-&gt;route('cd.index')-&gt;with('success','deleted successfully!');
  }
  </code></pre>
  
  <p>And something like this in my view for the button on each row:</p>
  
  <pre><code>@foreach ($scores as $score)
  &lt;tr&gt;
      &lt;td&gt;{{ $score-&gt;id }}&lt;/td&gt;
      &lt;td&gt;{{ $score-&gt;serialnumber }}&lt;/td&gt;
      &lt;td&gt;{{ $score-&gt;name }}&lt;/td&gt;
      &lt;td&gt;{{ $score-&gt;created_at }}&lt;/td&gt;
      &lt;td&gt;&lt;/td&gt;
      &lt;td&gt;
          &lt;button class="btn btn-danger" type="submit"&gt;Delete this Row&lt;/button&gt;
          {{ csrf_field() }}
      &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>This is the result I and I dont get any errors, but the button does nothing:</p>
  
  <p><a href="https://i.stack.imgur.com/fgrOy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fgrOy.png" alt="Rendered view"></a></p>