我想从数据库填充文本字段的值,如果它不等于默认列值。 $event_date
的默认列值为'0000-00-00 00:00:00'
。填充文本提交的值或占位符laravel
如果$event_date='0000-00-00 00:00:00'
话,我想用占位符Date
@if($conversation->event_date!='0000-00-00 00:00:00')
<div class="form-group">
{{ Form::text('event_date', null, array('class' => 'form-control
conversation-field')) }}
</div>
@else
<div class="form-group">
{{ Form::text('event_date', null, array('class' => 'form-control
conversation-field','placeholder'=>'Date')) }}
</div>
@endif
有什么问题吗? –