why toSql() method is not available on some methods of queryBuilder #38750
-
Why dd and toSql methods do not exist on all methods like (update / upsert / insert / delete) is there any easy way to make this query with queryBuilder ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
These methods execute the query, they do not return a query builder instance. If these methods returned a query builder instance you would need to somehow execute the query with an additional You can log the queries and inspect them if you want to see which sql query was executed by Laravel. |
Beta Was this translation helpful? Give feedback.
These methods execute the query, they do not return a query builder instance.
If these methods returned a query builder instance you would need to somehow execute the query with an additional
execute()
call or something.You can log the queries and inspect them if you want to see which sql query was executed by Laravel.