1

How can I echo the value of the database value into input type? Here's the database variable

      $suppliers->supplier_name

And here my form text code. this code is not working...

   {!! Form::text('supplier_name', '', array('class' => 'form-control','value'=>'$suppliers->supplier_name')) !!}

I'm using laravel 5.1

1 Answer 1

2

Second parameter is the value for the input, so:

{!! Form::text('supplier_name', $suppliers->supplier_name, array('class' => 'form-control')) !!}
Sign up to request clarification or add additional context in comments.

2 Comments

Welcome! If it worked, don't forget to mark as accepted, to help others to find the answer.
On the left of my answer, the outlined checkmark :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.