我最近向我的项目添加了可排序和删除模式。添加删除模式后,我现在将分页渲染两次。(包括图片以说明)。我的控制器 public function index() { $contacts = Contact::sortable('firstName')->paginate(10); return view('contacts.index', ['contacts' => $contacts]); }我的网络打包混合.jsconst mix = require('laravel-mix');/* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */mix.js('resources/js/app.js', 'public/js') .sass('resources/sass/app.scss', 'public/css');mix.webpackConfig(webpack => { return { plugins: [new webpack.ProvidePlugin({ $: "jquery", jQuery: ["jquery", "$"], "window.jQuery": "jquery", Popper: ["popper.js", "default"] })] };});我已经尝试了很多事情,但我在这个问题上有点不合时宜。一如既往,提前致谢!!!
1 回答
沧海一幻觉
TA贡献1824条经验 获得超5个赞
为了快速查看更改一些内容。还要检查您的某些代码是否未正确注释,或者是否缺少 div。
<div class="row">
<div class="table-responsive">
<table>
//here goes your table data
</table>
// pagination goes here or after the next div
{{ $contacts->links() }}
OR
//you can write this way either
{{ $contacts->appends(request()->except('page'))->links() }}
</div>
</div>
//Modals goes here...
//comment {!! $contacts->appends(\Request::except('page'))->render() !!} if it is not commented
添加回答
举报
0/150
提交
取消
