title: Laravel constraint error
body: <p>After I filled in the dropdown menu with a forloop using the data of the inner join query that had been made. Everything was shown in the dropdown menu as it should. (company_name - task title). But when I press on save, my ajax throws an error which I will paste below.</p>
  
  <pre><code>&lt;td&gt; &lt;select class='project_id'&gt;@foreach($query as $data)&lt;option&gt;{!!  $data-&gt;company_name !!} - {!! $data-&gt;title !!}&lt;/option&gt;@endforeach&lt;/td&gt;
  </code></pre>
  
  <p>is the piece of code I use to loop through the query and to post the values in the dropdown menu</p>
  
  <p>The printscreen of a part of the query and the values is posted below:
  <a href="https://i.stack.imgur.com/IDItx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IDItx.jpg" alt="enter image description here"></a>
  The error I get when I press the save button is.</p>
  
  <p><a href="https://i.stack.imgur.com/WMmoT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WMmoT.jpg" alt="enter image description here"></a></p>
  
  <p>If I check the object that gets sent via my ajax request. I see this:</p>
  
  <p><a href="https://i.stack.imgur.com/Rcenv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rcenv.jpg" alt="enter image description here"></a></p>