andersao / andersao/l5-repository

How to use with the function DB::raw ( Como utilizar com a função DB::raw() )

Offen
#386 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
PHP
Sterne
4.2k
Forks
880
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I am trying to use a function in the clause, but I can not implement it because it is a function of the database called "remove_acento". When you try to use it like this:
$ Where = [
["Remove_acento (name)", "ilike", "% remove_acento ('. $q.')%"],
["Glo_pais_id", "=", $ p]
];
But it gives error saying that the field does not exist. How to use functions with this plugin, which would be the same thing as using DB :: raw
=======================================================
=======================================================
Pessoal, estou tentando usar na clausula uma função, mas não consigo implementá-la pois ela é uma function do banco de dados chamada "remove_acento".
Ao tentar utilizar assim:
$where = [
["remove_acento(name)", "ilike", "%remove_acento('.$q.')%"],
["glo_pais_id", "=", $p]
];
Mas dá erro dizendo que o campo não existe. Como utilizar funções com este plugin, que seria a mesma coisa que utilizar DB::raw

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.