DB::table() code example
Example 1: DB::table('users')->get();
$product = DB::table('product')->get(['id','product_name']);
Example 2: laravel find query
<?php
$flights = App\Models\Flight::all();
foreach ($flights as $flight) {
echo $flight->name;
}