My problem is that I want to paginate the search results, but laravel's paging is based on Elouqent and the database query builder. I don't know how to implement it in the controller and front-end view.
This is the code to do a database search:
$article = Searchy::companys('title','body')->query($request->seek)->get();
Please give me some advice.
This is a blog I read myself, which solved the problem of no instantiation and no link. When writing code, the page number was not processed, which is not good code. . .
Blog address Laravel manual paging implementation
Use Illuminatepagniate or lengthawaredpagniate.
Then for new Paginate(), you need to check the incoming parameters in the manual
You don’t need to get, just use pagination directly after the query