eloquent where raw

Solutions on MaxInterview for eloquent where raw by the best coders in the world

showing results for - "eloquent where raw"
Marin
30 May 2020
1use Illuminate\Support\Facades\DB;
2
3$users = DB::select('select * from users');
4
5foreach ($users as $user) {
6    echo $user->name;
7}
Alina
09 Feb 2016
1/*
2whereRaw / orWhereRaw
3The whereRaw and orWhereRaw methods can 
4be used to inject a raw "where" clause into your query. 
5These methods accept an optional array of bindings as their second argument:
6*/
7$orders = DB::table('orders')
8                ->whereRaw('price > IF(state = "TX", ?, 100)', [200])
9                ->get();
Philipp
31 Nov 2020
1$query->whereRaw("(
2        LOWER(name)             like '%". strtolower($search) ."%' OR
3        LOWER(sku)              like '%". strtolower($search) ."%' OR
4        LOWER(codigo)           like '%". strtolower($search) ."%' OR
5        LOWER(descricao_curta)  like '%". strtolower($search) ."%'
6    )");
queries leading to this page
show laravel sql querywhen laravel querywhen query laravellaravel query inlaravel getquery sqllaravel query tosqlhow to query database in laravel modellaravel mysql query getlaravel databas queryhow to do a query in laravel 7laravel use sql querylaravel write own sql querycreate query laravel projectdb 3araw laravellaravel 8 eloquent findlaravel querysselect in laravel querydb 3a 3atable where query laravellaravel query builder ormsql query laravel laravel eloquent having rawdb raw sql laravellaravel sql querrieslaravel select querieshow to use database query laravelexplain query in laravelusing in laravel queryhow to order database name in laravellaravel db facadedbquery laraveluse db in laravel db querythis db select laravellaravel query with indatabase query in laravelcreate query in laravel with db facadehow to select query in laravellaravel 8 table bindingseloquent db raw valuelaravel eloquent rawlaravel get sql from querydatabase query laravel exampleuse sqlsrv query laravellaravel raw insert querylaravel db 3a 3aquery 28 29mysql db query laravellaravel query in mysqllaravel query builder functionslaravel sql databaseuse in laravel functionlaravel add select queryeloquent get laravel db table querylaravel when querylaravel prepare sql get querylaravel select query use dbyunion query in laravellaravel make querylaravel query to mysql laravel use in query 3d query in laravellaravel add to selectdb function in laravel queryquery db laraveleloquent raw queriessql query in laravel controllerquery in laravel simple dbin in laravel sqlmaking sql queries in laravellaravel query manualhow to start a query in laravelcreate query laravelunder request sql laravel where id 3dlaravel mysql queryselect query in laravelnot in query in laravellaravel query dblaravel to sqlwhen in laravel querylaravel querylaravel documentation sql querieslaravel query with mysql functionslaravel sql latest query 24this 3equery laravelfrom to in laravel querywhere raw laravellaravel use sql and sqlitelaravel use full sql queryselect sql query in laravelto query laravellaravel wherein db rawlaravel sql querylaravel sqlite3db 3a 3astatement 28 24sql 29 in laravellaravel query to sqlquery mysql laravellaravel query 3a 3acreatewrite sql query in laravellaravel where andcreate table laravel db 3arawlaravel mysql raw query setdo you write sql in laravelwith in sql query laravel 6query select laravellaravel eloquent get db 3araw 3a 3aquery laravellaravel raw sql inserthow to write sql query in laravellaravel see sql querywhy we use db query in laraveldb raw eloquentlaravel sql 25use raw query in laravel eloquenttablel query in laravelquete sql laravelhow to use sql query in laravelhow to use when in laravel querylaravel as sqlquery using db 3a 3atable laravellaravel select database query dbdb select query with where in laravelsql query where in laravelraw query in laravel eloquent insertlaravel 24query 3d db 3a 3atabledb 3a 3aselect 28 29 in laravellaravel select from table in objectlaravel eloquent select aslaravel raw query group by laravel db 3aquery usagraw query in laravel eloquentlaravel 3aquerylaravel update querywhere sql in laravelselect raw in laravel eloquentlaravel eloquent where db rawuse with in laravel querryget sql from laravel querylaravel query in sqllarabel db sqlphp laravel sql query select columnwhen 3a 3aquery in laraveldb facade laravellaravel make mysql querydb query laravelsql laravellaravel query explainlarave latest 28 29how to use sql query into laravellaravel execute sql querylaravel smaller development dblaravel db selectwhere or clause in laravellaravel how to get a sql querywhat does laravel query 28 29 dolaravel query different from raw sqllaravel store result laravel findwhen query builder eloquentlaravel query specify databaselaravel to sql querylaravel query builder cookbooklaravel query to sql stringlaravel db 3a 3atable select wherelaraver order by havinguse using in laravel queryeloquent to raw sqllaravel write native sql querylaravel in querywhat is query 28 29 in laravel 3fsql to laravellaravel get sql query selecthow to write a query in laravelhow to write query in laravellaravle queryquery sql laravellaravel create a querylaravel get from sql whewrelaravel with 28 29 querywhat laravel uses in database queryeloquent betweenlaravel usingdb facadelaravel select query asget db query laraveland and db query laravellaravel where db querywith in db query laravelexcute sql query laravelrunning sql queries laravellaravel sqlraw where in laravelsql raw eloquentlaravel db query resultsdb query in laraveldb 3a 3aupdate inn laravelhow to write sql query in blade laravel 3d 3c laravel queryselect in laraveldb select query in laravellaravel get mysql querylaravel db 3a 3aquery examplequering database laraveldb raw sum in sql query laravellaravel query whensql query for laravellaravel raw where clauselaravel db query samplelaravel with querydatabase quey laraveldb 3a 3asql laravelleft join raw laravellaravel db select aslaravel select raw where asphp laravel sql 3ewith 28 29db 3a 3a select laravelselect laravel dbhow to use query in laravel6get query from sql laravellaravel eloquent raw sqllaravel how to get sqllaravel eloquent raw select tolaravel db query examplelaravel raw where querydatabasee query in laravelstandard query laravelorwhere in laravellaravel or wherephp laravel sql querylaravel use query sqlwhere do queries go in laravelcreate query in laravelget query laravel db tablewhat is db facade in laarvelwharehas query in laravellaravel mysql and query databaseto sql query laraveldb 3a 3aselect laravelwherein query in laravelbettweween eloquentquery builder to sql laravellaravel query with 28 29query laravel db 24this db query in laravelhow to write query in with laraveldo a manual query in laravelwhen query in laravellaravel eloquent db rawlaravel 5 do query with sqlselect from where sql with laraveluse sql in laravelquery example laravellaravel query on databaselaravel where or where functionlaravel with sqllaravel eloquent debugging constraints 3a 3aquery 28 29 lavarelrun sql query using php in laravellaravel query builder on modellaravel eloquent select name or emailquery with or laravelhow to excute regular sql query in laravel dblaravel 8 query sqllaravel select where firstwith with db query laravellaravel create php queryrow sql query laravelhow to apply rawselect in join tablelaravel 3a 3aqueryeloquent to sql query laravelsql query use in laravellaravel query selectlaravel raw order bywrite queries in eluqent with function laravellaravel database statement querydirect sql query in the laravelhow to do query 3d query 2b in laravellaravel query exampleeloquent sql rawlaravel elequent where not inhow to impleament sql read laravelwhen on laravel query laravel use sqllaravel queryinglaravel get sql query from querywrite query sql in laravelwhere eloquent laravel 8laravel queriesget query sql laravellaravel raw query to eloquentgroupbyraw laravellaravel poor sql query excutelaravel where sqllaravel queery builderlaravel db query select laravel get sql queriesdb 3a 3aquery 28 29 in laravelquery with laravellaravel query function use in controllereloquent where rawdb 3a 3aquery laravellaravel latest 28 29use laravel when queryto sql function in laraveleloquent toraw queryhow to use and or query in laravel 8laravel database querylaravel between query 3d laravel queryhow to write or sql in laravellaravel db clauselaravel query andexecute raw query in laravel 8db laravel querylaravel where with selectraw query inside wherein in laraveldb 3a 3aquery in laravelwrite sql queries in laraveland query laravelquery database laravellaravel get raw query from eloquentlaravel get sql querydb query select laravelusing query 28 29 in laravelselect query laravelhow to use query in laravelraw queries in laravelprepare query in laravellaravel db facade methodeloquent raw query parameters 3c 3e in laravel queryhow to do database query in laravelselect sql query in laravellaravel query into queryhow to use raw query in laravel eloquentshould i write query in laravellike in laravel query builderdb raw in where clause in laravellaravel query get sqlselect where sql laraveladd select to laravellaravel query withlaravel query statementselect query in laravel sqlitelaraver query builder updatelaravel query databasedb select laravelsql select laravellaravel do querysend query data to user laravelhow to see laravel sqlsql query in laravel bladelaravel query 28 29 3bdb sql query in laravellaravel eloquent query builder available methodssql in on laravellaravel create sql queryeloquent selecthow to use raw sql query in laravel 8 controllerwith query laraveloperator laravel eloquentselect query in sql in laravel 3c 3e laravel queryquery of query in laravelselectraw query in group bylaravel eloquent select where in laravel db query u 5dlaravel query 28 29db raw sum laravel query db in html laravellaravel query sqllaravel model select with querylaravel make database querydb query laravel selectlaravel sql query in bladequery select in laravelselect php query in laravelhow query on laravelphp laravel select queryhow to use query in with 28 29 laravellaravel sql select 2asql query in laravellaravel raw query in relationlaravel db 3a 3aquery in baldelaravel write sql queryquery builder phprunning queries laravel sqllaravel eloquent select as wheremake a query in laravellaravel manually execute sql query 24query 3eselect 28 3a 3aquery 28 29 laravelquery 3a 3a laravelbest way to write sql query in laravellaravel select from data baselaravel raw sqllaravel run sql querylaravel query statement laravelexecute sql query laravelquery with laravelaravel querularavel db querieslaravel sql query stringwhere 28 laravelusing when in laravel queryquery laravel databaselaravel db run querydb select query laravellaravel get sqlwhere condition in lravel db row query in laravelupdate query build in laravellaravel add query to querylaravel 22 2f 3c 2f 3c 2f 3csql 22where in sql query in laraveleloquent select rawhow to handle 3fquery in laravellaravel query where or and notfunctional sql query in eloquentlaravel and querylaravel query sql serversql database in laraveleloquent query builder rawquery 28 29 in laravellaravel as clause sqlusing with query in laravellaravel query tablelaravel db raw joinselect query in laravellaravel db 3a 3atable whereraw if 28how write query in laravelfacade db laravelselect table in sql in laravelhow to use db raw query field in where clause in laravelequlat with db query laravein in laravel querylaravel query wilaravel where selectand in db query laravelin query in laravellaravel query builder sqlphp laravel querylaravel equivalent to sqllaravel 24querydb queries in laravellaravel eloquent select rawdb query in laravel bladelaravel select querylaravel row queryhow to fire simple sql query in laravelhow to write sql query in laravel controllerusing with laravel querylaravel ataque sqlselecte query in laravellaravel db statement selecthow to make table using raw query laravellaravel sql as 26 where laraveleloquent with query builderget mysql query laravelquery function modified in laravellaravel select raw joinlaravel with query selectlaravel db raw left joinlaravel database queriesdb get query laravelqueries in laravellaravel 8 querieswhat is laravel query 28 29can i use first function in where clause in laravellaravel query dataqquery in laravellaravel db query whenlaravel db facade to sqllaravel database select queryget sql query laravellaravel sql server querylaravel having orhow to write in query in laravelhow to get sql query from laravelcondition sql query in laravel controllerlaravel db 3a 3astatementwherein raw laravellaravel sql to query builderwhat does laravel query 28 29 laravel query build savelaravel raw query updatelaravel mysql query examplelaravel eloquent to raw sqlselect laravellaravel query builder not insert integerlaravel db select queryquery laravelwhere query in sql laravel 3d 3dlaravel select from db querylaravel insert raw sql in query builderlaravel where clause operatorshow to use with in db query laraveldb in laravel querywhere and laravelselect raw laravel eloquenthow to write query in db in laraveldb raw laravel 27insertlaravel db queryselectraw laravelexecute query sql in laravellaravel native sql querylaravel where irwhat is 3c 3e in laravel query where raw eloquentlaravel database queries tutorialhow to use builder in laravel 3d in laravel queryselect laravel querydb 3aselect laravelhow to write an sql query in laravel eloquentlaravel eloquent where rawwith laravel querywhere function laravel eloquentwhen laravel query examplelaravel countqueries in laravellaravel what with query doeshow to use db query in laravelsql to laravel query builderlaravel sql statementdb table select laravelget sql query in laravelraw eloquent laravellaravel db 3a 3aselect sql statementlaravel db sqllatest in laravelwhere we can write sql quries in laravelphp query builderall database query in laravelselect db raw laravelwrite with in when query laravelquery in laravel db 3a 3aquerylaravel db 3a 3aquery in bladedb laravel selectwhere in query builderselect sql laravellaravel make sql queryhow to use with in laravel querywhat sql laravel uselaravel sql withselect where laravel eloquentlatest 28 29 laraveleloquent wherein rawlaravel raw select with eloquentadd column using get map query builder using laravellaravel where we place sql queriescrate query in laravelhow to make query in laravellaravel query 3e select dblaravel sql query andwith 28 29 laravel queryor where laravelmanagement sql query by laravellaravel db query for selectdb 3alaravel where updatelaravel db sql querylaravel eloquent query to raw queryeloquent selet statement raw querylaravel whenlaravel selectrawdb query and with in laravel 6use db laravelconvert raw query to eloquent laraveldbget query laravellaravel database query builder query definitionlaravel where querylaravel 8 use sql querylaravel query to mysql querylaravel get query sqlmysql row query tun in laravel demo with codelatest method in laraveladd select query laravelhow to get sql from laravelget laravel sql querylaravel db select something ifhow to use as in laravel queryget sql laravellaravel dbquerydb 3a 3araw query in laravellaravel normal sql querywhere in sql laravel db selectin db query laravellaravl sqllaravel query db selectquery builder laravel how to see the sqllaravel db 3a 3aquerydo querys in laravelmake sql in laravellaravel db query getlaravel using querybuilderlaravel using db facadeselect db raw eloquentdatabase query laraveleloquent prepared statementhow to write in sql query in laravel 3a 3aquery in laravellarvel query dbexecute sql query in laravel7query on laravellaravel model raw queryquery 28 29 laravelselect mysql laravelin sql laraveltosql laravel queryquery database in laraveleloquent raw querylaravel select pass astring query builderselect laravel databaseuse query laravelraw sql query in laravellaravel sql raweloquent raw sql querylaravel query and withlaravel db statement return valuesdb 3aquery laravelmysql query laravelwherevarcharinraw laravellaravel database facadequery builder laravel group byquery php laraveldb table query laravelwhere rawsql in laravelcontroller passing on aggregated values laravellaravel db add amount sql columndata query in laravel 8laravel query createhow to write sql in laravellaravel eloquent query to sqlwhere query laravelnew query laravellararvel db queryraw query in where clause laravellaravel db 3a 3atable with where conditionlaravel as sql eloquetorder by raw query in laravellaravel shoe querylaravel query this db query laravel select sqllaravel group by rawlaravel do sqlquery when laraveldb elecount query laravelhow to use and in laravel queryin query laravellaravel raw queryquery object laravellaravel 3d querylaravel db facade composerlaravel raw sql querydb select in laravelselect query for laravelwhat is query laraveldatabase queries in laravellaravel db query select 2a from tablewhat is use in query laravellaravel query 28 29 selectlaravel create queryeloquent where raw