Create a Game model which extends Eloquent and use this:
Game::take(30)->skip(30)->get();
take()
here will get 30 records and skip()
here will offset to 30 records.
In recent Laravel versions you can also use:
Game::limit(30)->offset(30)->get();
More Related Contents:
- How can I implement single table inheritance using Laravel’s Eloquent?
- Laravel Eloquent Ignore Casing
- convert mysql query to laravel query builder
- Laravel one to many relation with a one to one relation
- MySQL offset infinite rows
- Laravel Migration Error: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
- How does MySQL process ORDER BY and LIMIT in a query?
- How to do this in Laravel, subquery where in
- Laravel OrderBy relationship count
- Laravel 5.2 – Use a String as a Custom Primary Key for Eloquent Table becomes 0
- passing LIMIT as parameters to MySQL sproc
- Laravel $q->where() between dates
- Laravel join with 3 Tables
- Laravel Eloquent group by most recent record
- Eloquent many-to-many-to-many – how to load distant relation easily
- “General error: 1005 Can’t create table” Using Laravel Schema Build and Foreign Keys
- Retrieving only a fixed number of rows in MySQL
- Creating MYSQL Procedure in Laravel 4 Migrations
- Eloquent groupBy make “SQLSTATE[42000]” with valid SQL query in Laravel 5.3
- Laravel – search with multiple keywords against multiple columns with the search result to be ordered in relevance
- Does COUNT(*) always return a result?
- What is the most straightforward way to pad empty dates in sql results (on either mysql or perl end)?
- Return the nth record from MySQL query
- Mysql Improve Search Performance with wildcards (%%)
- mysql sort string number
- How to add a primary key to a MySQL table?
- MySQL Error: #1142 – SELECT command denied to user
- Laravel MySql DB Connection with SSH
- Get column sum and use to calculate percent of total (mySQL)
- is there a length limit to group_concat or another reason why it would not work on a text field