Support the ongoing development of Laravel.io →
Input Eloquent Laravel.io
Last updated 1 year ago.
0

what else do you have in model? there is a hidden field as well?

also can you please do var_dumps of:

  1. Form ie $request to see if all data is there
  2. $book.. to see if all data gets transferred

maybe code for the form will also help us?

0

shez1983 said: This is all my model as i above share code .... Its only save First input value in database,,,

0

did you look at rest of my post and did those things?

0

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> @endsection
0

of course me asking you to debug to find out what was happening didnt help at all!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.