title: Internal Server Error (500)
body: <p>Having issue with this</p>
  
  <pre><code>if(attributeName == 'id'){
      var id = dataValue;
  
      $("#discard").click(function(){
          alert(id);
  
          $.ajax({
              url: 'deleteob/' + id
          });
  
      });
  }
  </code></pre>
  
  <p>I have this route in web.php</p>
  
  <pre><code>Route::get('/deleteob/{id}', 'RequestsController@deleteOBRequest');
  </code></pre>
  
  <p>Then this is my controller</p>
  
  <pre><code>  public function deleteOBRequest($id){
  
      $masterIds = OBMaster::findOrFail($id);
      $detailIds =  OBRequest::where('details_id', $masterIds-&gt;id);
  
      $masterIds-&gt;destroy();
      $detailIds-&gt;destroy();
  
      return redirect('OB_ViewDetails');
    }
  </code></pre>
  
  <p>My problem is there's is a internal server error (500). i'm new in laravel. 
  Hope someone can give me some ideas.</p>