laravel 8 filters get data from database code example
Example 1: laravel 8 orderby
$flights = App\Models\Flight::where('active', 1)
->orderBy('name', 'desc')
->take(10)
->get();
Example 2: laravel find query
foreach (Flight::where('foo', 'bar')->cursor() as $flight) {
//
}