You cannot since select will execute the query already. You could possibly use
DB::table('web_v2.web_mnp')->paginate()
however, I don't understand web_v2.web_mnp('','','','','','','','','','',''); what does it mean?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
$sql = DB::select("select * from web_v2.web_mnp('','','','','','','','','','','')") ->paginate(10);
return Inertia::render('Mnp/View', [
'sql' => $sql
]);
This gives error 'Call to a member function paginate() on array'. I need to use postgresql functions instead of tables, sql is to complicated to rewrite in eloquent and i do not want it in there. I also want to use laravel paginate() as it works very well with element plus el-paginate and el-table. Please don't suggest changing to eloquent this is how i want it.
Please or to participate in this conversation.