I'm building a form with LaravelCollective and I'm taking the benefits from Form Model Binding to use it creating or editing the model.
I have this field:
{{ Form::text('price', null, ['class' => 'form-control']) }}
If I open the form with Form::model() it shows the model value. The problem is that I need it to have a default value of 0.
I achieved it this way but I'm looking for a more elegant way
{{ Form::text('price', isset($product)? $product->price : 0, ['class' => 'form-control']) }}
If I make this:
{{ Form::text('price', 0, ['class' => 'form-control']) }}
It always override the value to 0 even if I'm editing a Model.