sql >> Base de Datos >  >> RDS >> PostgreSQL

WhereRaw Laravel con variable

La forma más sencilla de hacerlo. Espero que te ayude

DB::table('my_table')->select('id')
    ->where(DB::raw("UCASE(name)"), $upper_name) 
    ->first();

UCASE - Convertir el texto a mayúsculas