take and skip in laravel

67

take and skip in laravel -

$count = Attendance::count();
$skip = 5;
$limit = $count - $skip; // the limit
$collection = Attendance::skip($skip)->take($limit)->get();

Comments

Submit
0 Comments