Generate The Raw MySQL Query From Laravel Query Builder

后端 未结 14 1202
醉话见心
醉话见心 2021-02-02 12:04

How can i get mysql query of a laravel query

Convert:

App\\User::where(\'balance\',\'>\',0)->where(...)-         


        
14条回答
  •  暖寄归人
    2021-02-02 13:08

    A very simple and shortcut way is below Write the name of column wrong like write 'balancedd' in spite of 'balance' and the query will be displayed on error screen when you execute code with all the parameters and error that column not found.

提交回复
热议问题