Search code examples
phpsqllaravel-4adminlte

laravel 4.2 get last 10 records


How to get last 10 records using AdminLTE in Laravel 4.2 from a specific table from the database?


Solution

  • try

    foo::orderBy('id', 'desc')->take(10)->get();