laravel query builder documentation code example
Example 1: DB::table('users')->get();
$users = DB::table('users')->get();
Example 2: query builder laravel
use Illuminate\Database\Eloquent\Builder;
public function scopeFakePersons(Builder $query): Builder
{
return $query->where('is_fake', 1);
}