I need to return the last 10 records for a view ..
return view('home.home', [
'data' => $this->sale->get(), //aqui eu quero pegar os 10 últimos
'nav' => 'dashboard'
]);
Is there any Eloquent method that does this?
I need to return the last 10 records for a view ..
return view('home.home', [
'data' => $this->sale->get(), //aqui eu quero pegar os 10 últimos
'nav' => 'dashboard'
]);
Is there any Eloquent method that does this?