<h1>{!! $cate->name !!}</h1> @foreach($articles_cat as $item) <article class="article_typesome"> <header class="postheader_typesome"> <ul> <?php $user_id = $item->user_id; $user = Simple_Blog\User::where('id', $user_id)->first(); ?> <li><img class="author-thumb_typesome" src="{{asset('public/upload/images/'.$user->avatar)}}" alt="Author image" nopin="nopin"></li> <li class="name-thumb_typesome"><a href="#">{!! $user->name !!}</a></li> <li class="date_typesome"><time>{!! $item-> created_at !!}</time></li> <li class="posttags_typesome"> <?php $cate_id = $item->cate_id; $cate = Simple_Blog\Cate::where('id', $cate_id)->first(); ?> <a href="#">{{$cate->name}}</a> </li> </ul> <h2 class="posttitle_typesome"><a href="{{route('detail.show',[$item->id])}}" rel="bookmark"> {!! $item->title !!} </a></h2> </header> <div class="postcontent_typesome"> <p>{!! substr($item->content,0,300)!!} ... </p> </div>
</div> <div class="form-group"> <label for="content">Content</label> <textarea name="content" placeholder="Cotent ..." class="form-control ckeditor" >{{ old('content') }}</textarea> </div> <!-- Select Basic --> <div class="form-group"> <label class="col-md-2 control-label" for="selectbasic">Category</label> <div class="col-md-4"> <select id="selectbasic" name="category" class="form-control"> <option value="">Select Category</option>} <?php $cates = Simple_Blog\Cate::select('id', 'name')->get(); ?> @foreach($cates as $item) <option value="{!! $item->id !!}">{{$item->name}}</option> @endforeach </select> </div> </div> </div> <div class="box-footer"> <button type="submit" class="btn btn-primary">Add</button> <button type="reset" class="btn btn-danger">Reset</button> </div> <!-- /.box-body --> </div> </form>