Answers for "Laravel collection last 10 records"

PHP
4

laravel get last 5 records

Dogs::latest()->take(5)->get();
Posted by: Guest on May-23-2021
0

laravel collection last

collect([1, 2, 3, 4])->last(function ($value, $key) {
    return $value < 3;
});

// 2
Posted by: Guest on July-24-2021

Code answers related to "Laravel collection last 10 records"

Browse Popular Code Answers by Language