Please help me. How save data from form? If its standard from, everything works, but my code for form is:
{!! Form::open(['url' => 'fill2', 'method' => 'post', 'class' => 'result', ]) !!}
@forelse ($quests as $quest)
@if($post->form_id == $quest->form_id)
<blockquote class="blockquote bq-success">
<p class="bq-title"></p>
<p></p>
<div class="d-flex flex-column">
@foreach($responses as $response)
@if($quest->quest_id == $response->quest_id)
<table>
<tr>
<th>
<input type="" name=""></th>
<th><label class="radio-inline"></label></th>
</tr>
</table>
@endif
@endforeach
<small></small>
</div>
</blockquote>
@endif
@empty
@endforelse
{!! Form::button('Send', ['type' => 'submit', 'class' => 'btn btn-primary']) !!}
{!! Form::close() !!}
And my code in controller is
$result = Auth::user()->results()->create($request->all() ?: []);
return $result->toArray();
And result: {"user_id":4,"id":20} - only this is saving to database
I have maybe 30 checkboxs, but anything no save to database, and no send to post request. Any idea?
Aucun commentaire:
Enregistrer un commentaire