db get laravel code example
Example 1: DB::table('users')->get();
$users = DB::table('users')->get();
Example 2: DB: in eloquent using sql
$results = DB::select('select * from users where id = :id', ['id' => 1]);
Example 3: laravel having
$users = DB::table('users')
->groupBy('account_id')
->having('account_id', '>', 100)
->get();