Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Laravel中的DataTables自定义搜索_Laravel_Datatables - Fatal编程技术网

Laravel中的DataTables自定义搜索

Laravel中的DataTables自定义搜索,laravel,datatables,Laravel,Datatables,我正在使用laravel创建联系人页面,这是我的查看代码: <table id="example"> <thead> <tr> <th class="no-sort"></th> </tr> </thead> <tbody> <?php $idx = 1; ?> @foreach

我正在使用laravel创建联系人页面,这是我的查看代码:

<table id="example">
    <thead>
        <tr>
            <th class="no-sort"></th>
        </tr>
    </thead>
    <tbody>
        <?php $idx = 1; ?>
        @foreach($users as $result)
            @if($idx == 1) <tr> @endif
            <td class="col-md-4 col-sm-4 col-xs-12 animated fadeInDown">
                <div class="well profile_view">
                    <div class="col-sm-12">
                        <h4 class="brief"><i>Digital Strategist</i></h4>
                        <div class="left col-xs-7">
                            <h2>{!! $result->first_name !!}</h2>
                            <p><strong>Username: </strong> {!! $idx !!} </p>
                            <ul class="list-unstyled">
                                <li>{!! $result->email !!}</li>

                            </ul>
                        </div>
                        <div class="right col-xs-5 text-center">
                            @if($result->image)
                                {!! Html::image('packages/calibre/images/profile/'.$result->image, '', array("class"=>"img-circle img-responsive")) !!}
                            @else
                                {!! Html::image('packages/calibre/images/profile/none.png', '', array("class"=>"img-circle img-responsive")) !!}
                            @endif
                        </div>
                    </div>
                    <div class="col-xs-12 bottom text-center">
                        <div class="col-xs-12 col-sm-12 emphasis">
                            <button type="button" class="btn btn-success btn-xs pull-left"><i class="fa fa-check"></i> Active</button>
                            <button type="button" class="btn btn-primary btn-xs pull-right"><i class="fa fa-search"></i> View Profile </button>
                        </div>
                    </div>
                </div>
            </td>
            @if($idx == 3) </tr> @endif
            <?php if($idx == 3) $idx = 1; else $idx++; ?>
        @endforeach
    </tbody>
</table>

@foreach($users as$result)
@if($idx==1)@endif
数字战略家
{!!$result->first\u name!!}
用户名:{!!$idx!!}

  • {!!$result->email!!}
@如果($result->image) {!!Html::image('packages/calibre/images/profile/'.$result->image',array(“class”=>“img circle img responsive”) @否则 {!!Html::image('packages/calibre/images/profile/none.png','',数组(“class”=>“img circle img responsive”)) @恩迪夫 活跃的 视图配置文件 @如果($idx==3)@endif @endforeach
布局不同于普通表,它使用模板中的标记


如何使用DataTables进行搜索和分页?有人能帮我吗?

只是一个提示,如果你删除了一些类,它更容易阅读,这样我们就不必筛选所有的
col-md-4 col-sm-4 col-xs-12
这就是你说的吗?你看过这些文件了吗?