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.
<td> <select class='project_id'>@foreach($query as $data)<option>{!! $data->company_name !!} - {!! $data->title !!}</option>@endforeach</td>
is the piece of code I use to loop through the query and to post the values in the dropdown menu
The printscreen of a part of the query and the values is posted below: The error I get when I press the save button is.
If I check the object that gets sent via my ajax request. I see this: