Browse Source

文章封面

Silent 6 năm trước cách đây
mục cha
commit
a754c35642

+ 12 - 0
resources/views/admin/contents/create.blade.php

xqd
@@ -76,6 +76,18 @@
                                 </div>
                             @endif
 
+                            @if(in_array($type, [1, 4]))
+                                <div class="form-group row">
+                                    <label class="col-sm-2 col-sm-offset-1 control-label">封面</label>
+                                    <div class="col-sm-8">
+                                        {!!  widget('Tools.ImgUpload')->single('article-cover', 'data[pic_url]') !!}
+                                    </div>
+                                    @if($errors->has('pic_url'))
+                                        <span class="help-block">{{ $errors->first('pic_url') }}</span>
+                                    @endif
+                                </div>
+                            @endif
+
                             <div class="form-group row">
                                 <label class="col-sm-2 col-sm-offset-1 control-label">排序</label>
                                 <div class="col-sm-8">

+ 12 - 0
resources/views/admin/contents/edit.blade.php

xqd
@@ -77,6 +77,18 @@
                                 </div>
                             @endif
 
+                            @if(in_array($type, [1, 4]))
+                                <div class="form-group row">
+                                    <label class="col-sm-2 col-sm-offset-1 control-label">封面</label>
+                                    <div class="col-sm-8">
+                                        {!!  widget('Tools.ImgUpload')->single('article-cover', 'data[pic_url]', $item->pic_url) !!}
+                                    </div>
+                                    @if($errors->has('pic_url'))
+                                        <span class="help-block">{{ $errors->first('pic_url') }}</span>
+                                    @endif
+                                </div>
+                            @endif
+
                             <div class="form-group row">
                                 <label class="col-sm-2 col-sm-offset-1 control-label">排序</label>
                                 <div class="col-sm-8">