Hi
is it possible to have only one blade for create and edit?
I have try to implement and i am stack when define the value of a form element
{{ Form::label('title', 'Title', array('class' => '')) }}
{{ Form::text('title' , Input::old('title', $dataset->title) , array('class' => 'form-control')) }}
When comes the edit the $dataset->title is set from the model and its working fine
When comes the create no object $dataset exist and must set manual the $dataset->title to null to avoid the errors
Is it possible to create a $dataset object with all values to null based on the model
Is there any other way, i am new to Laravel
Thanks
This might work
<input type="text" {{ isset($dataset) ? 'value="$dataset->title"' : 'placeholder=""' }} />
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community