Question and answer is powered by AnsPress.io
Orderby id in descending order, limit to 5 records:
<?php DB::table('name')->orderBy('id', 'desc')->take(5)->get() ?>
or for pagination
<?php DB::table('name')->orderBy('id', 'desc')->paginate() ?>