Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 laravel 做一个项目。我在数据库中有 sql 查询作为字符串。查询非常重要。由于某些情况,无法在 laravel 关系中编写它们,所以
DB::select($table->query) 我想用 laravel 分页来分页。
Laravel Query Builder 也实现了该paginate()方法:
paginate()
DB::table($table->query)->paginate(15);
查看有关此主题的文档以获取更多信息。