what else do you have in model? there is a hidden field as well?
also can you please do var_dumps of:
maybe code for the form will also help us?
shez1983 said: This is all my model as i above share code .... Its only save First input value in database,,,
I solved that problem my self thank you. The problem is that we need to name of input and structure column name same ....@extends('ashish_layout') @section('content')
<ul>
@foreach($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
{{--we are dealing with forms here comments--}}
<table border="1" > <form method="POST" action="http://localhost/basic-laravel/public/store"> <tr><td>{!!Form::label('isbn', 'Isbn no')!!}</td> <td> {!! Form::text('isbn', null, ['required', 'placeholder' => 'ISBN no']) !!} </td></tr> <tr><td>{!!Form::label('name', 'Title')!!}</td> <td> {!! Form::text('title', null, ['required', 'placeholder' => 'TITLE OF BOOK']) !!} </td></tr><tr><td>{!!Form::label('bio', 'Writer Name')!!}</td> <td>{!! Form::text('author',null, ['required', 'placeholder' => 'Writer Name']) !!}</td></tr>
<tr><td>{!!Form::label('pub', 'Publisher Name')!!}</td> <td>{!! Form::text('publisher',null, ['required', 'placeholder' => 'Publisher Name']) !!}</td></tr>
<tr><td>{!!Form::label('dob', 'Year of published')!!}</td> <td>{!! Form::selectYear('yop',1960,2015) !!}</td> </tr>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<tr><td colspan="2" align="center">{!! Form::submit('Save') !!}</td></tr>
{!! Form::close() !!}
</table> @endsectionof course me asking you to debug to find out what was happening didnt help at all!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community