You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP Fatal error: Uncaught RuntimeException: A facade root has not been set. in /var/www/vhosts/localhost/vendor/illuminate/support/Facades/Facade.php:352
How can I properly use DB::raw in WordPress context to enable raw SQL expressions?
The text was updated successfully, but these errors were encountered:
rafaucau
changed the title
[QUESTION]: How to use DB::raw?
[QUESTION/BUG]: How to use DB::raw?
May 13, 2024
rafaucau
changed the title
[QUESTION/BUG]: How to use DB::raw?
[QUESTION/BUG]: How to use DB::raw? Uncaught RuntimeException: A facade root has not been set.
May 13, 2024
rafaucau
changed the title
[QUESTION/BUG]: How to use DB::raw? Uncaught RuntimeException: A facade root has not been set.
[QUESTION/BUG]: How to use DB::raw? / Uncaught RuntimeException: A facade root has not been set.
May 13, 2024
The facades are unfortunately not supported by the library since it is a few things that are mainly used by Laravel projects.
I will try to add these facades to the project but I am not sure it is possible since you have to go through the Illuminate container system. Unfortunately, this requires adding dependencies to projects:(
The only solution today is indeed what you propose in your message.
dimitriBouteille
changed the title
[QUESTION/BUG]: How to use DB::raw? / Uncaught RuntimeException: A facade root has not been set.
[FEATURE] Add Illuminate\Support\Facades\DB facade
May 15, 2024
I'm encountering an issue when trying to use
DB::raw
. The error message indicates a problem with the facade root not being set.How can I properly use
DB::raw
in WordPress context to enable raw SQL expressions?The text was updated successfully, but these errors were encountered: