I need to show a certain amount of values in a view.
I want to do something like SELECT * FROM tabla LIMIT 4
SELECT * FROM tabla LIMIT 4
But I need to do it in Laravel
The take () method of the Query Builder is the one that fulfills this function:
$resultado = DB::table('tabla')->take(4)->get();
As you can always see more info in the Laravel documentation: link
You can also see what this method does in the framework code: link