如何在Laravel中填写此字段?

时间:2017-05-11 05:11:41

标签: laravel-5.2

如何在每个属性中添加“请填写此字段”的form.blade?

<div class="form-group">
    {!! Form::label('title','Title:'); !!}
    {!! Form::text('title', null,['class'=>'form-control']); !!}
</div>
<div class="form-group">
    {!! Form::label('description','Description:'); !!}
    {!! Form::textarea('description', null,['class'=>'form-control']); !!}
</div>
<div class="form-group">
    {!! Form::label('stock','Stock:'); !!}
    {!! Form::text('stock', null,['class'=>'form-control']); !!}
</div>
<div class="form-group">
    {!! Form::label('category_id','Category ID:'); !!}
    {!! Form::select('category_id', $categories, null,['class'=>'form-control', 'placeholder'=>'Choose a Category']); !!}
</div>

    {!! Form::submit('Save',['class'=>'btn btn-success']); !!}

1 个答案:

答案 0 :(得分:0)

试试这个

  def fetch_abstract(pmid):
        handle = efetch(db='pubmed', id=pmid, retmode='xml')
        lines = handle.readlines()

        for line in lines:
            if   "<Title>" in line:
                print line,

    fetch_abstract("19555725")