index.blade.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. @extends('admin.public.base')
  2. @section('body_class')
  3. style="margin: 0 auto;width: 96%;padding: 30px 0px;"
  4. @endsection
  5. @section('content')
  6. @if(check_auth('admin/producer/add'))
  7. <div class="page-header">
  8. <a href="{{url('admin/producer/add')}}" class="btn btn-primary">新增</a>
  9. </div>
  10. @endif
  11. <form action="" method="get" class="form-horizontal form-line">
  12. <div class="form-group col col-lg-2 col-md-4 col-sm-6 col-xs-12" style="margin-right: 2px;">
  13. <input type="text" class="form-control" name="name" value="{{request('name','')}}" placeholder="请输入厂家名称查询" />
  14. </div>
  15. <div class="form-group col col-lg-2 col-md-4 col-sm-6 col-xs-12" style="margin-right: 2px;">
  16. <select name="status" class="form-control">
  17. <option value="" >状态</option>
  18. <option value="0" @if (request('status') === '0' ) selected="selected" @endif >正常</option>
  19. <option value="1" @if (request('status') === '1' ) selected="selected" @endif >禁用</option>
  20. </select>
  21. </div>
  22. <div class="form-group col col-lg-2 col-md-4 col-sm-6 col-xs-12" style="margin-right: 2px;">
  23. <input type="text" class="form-control" name="start_time" value="{{request('start_time','')}}" placeholder="请输入创建时间查询" />
  24. </div>
  25. <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
  26. <a href="{{url('admin/producer/index')}}" class="btn btn-sm btn-default" >重置</a>
  27. </form>
  28. <div class="row">
  29. <div class="col-xs-12">
  30. <div class="table-responsive">
  31. <table class="table table-striped table-bordered table-hover">
  32. <thead>
  33. <tr>
  34. <th>ID</th>
  35. <th>厂家名称</th>
  36. <th>修改时间</th>
  37. <th>操作</th>
  38. </tr>
  39. </thead>
  40. <tbody>
  41. @foreach ($list as $a)
  42. <tr>
  43. <td>{{$a['id']}}</td>
  44. <td>{{$a['name']}}</td>
  45. <td> {{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  46. <td>
  47. @if(check_auth('admin/producer/edit'))
  48. <a href="{{url('admin/producer/edit?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-warning" >编辑</a>
  49. @endif
  50. </td>
  51. </tr>
  52. @endforeach
  53. <tr>
  54. <td colspan="20" class="page">{{$list->render()}}</td>
  55. </tr>
  56. <tr>
  57. <td colspan="20">总计 {{$list->total()}} 个商店</td>
  58. </tr>
  59. </tbody>
  60. </table>
  61. </div>
  62. </div>
  63. </div>
  64. @endsection