SyntaxFix
Write A Post
Hire A Developer
Questions
Another way to do it is using a limit method:
limit
Listing::limit(10)->get();
This can be useful if you're not trying to implement pagination, but for example, return 10 random rows from a table:
Listing::inRandomOrder()->limit(10)->get();