dimanche 28 octobre 2018

my laravel project is throwing an error, can anyone debug this?

The error says 'QueryException Array to string conversion'.

Find my code below:

CreateProject.php

label for="client_id">Select Client*</label>
<select name="client_name_array" id="">
  @foreach ($clientsArray as $option)
      <option value=""></option>
  @endforeach
</select>

controller:

$projects = new Project([
            'client_name' => $request->input('client_name_array'),
]);


      $projects->save();
      return redirect('/projects')->with('status', 'Project updated!');;

Please let me know if you need any further info regarding this query. Thanks in advance.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2ObbAoV
via IFTTT

Aucun commentaire:

Enregistrer un commentaire