呼喚遠(yuǎn)方
2022-08-18 15:35:22
我最近向我的項(xiàng)目添加了可排序和刪除模式。添加刪除模式后,我現(xiàn)在將分頁渲染兩次。(包括圖片以說明)。我的控制器 public function index() { $contacts = Contact::sortable('firstName')->paginate(10); return view('contacts.index', ['contacts' => $contacts]); }我的網(wǎng)絡(luò)打包混合.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"] })] };});我已經(jīng)嘗試了很多事情,但我在這個(gè)問題上有點(diǎn)不合時(shí)宜。一如既往,提前致謝!!!
1 回答

滄海一幻覺
TA貢獻(xiàn)1824條經(jīng)驗(yàn) 獲得超5個(gè)贊
為了快速查看更改一些內(nèi)容。還要檢查您的某些代碼是否未正確注釋,或者是否缺少 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
添加回答
舉報(bào)
0/150
提交
取消