Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Eloquent insert query shows the query builder default select query #230

Open
eggnaube opened this issue Mar 21, 2019 · 1 comment
Open

Comments

@eggnaube
Copy link

The following query on Eloquent inserts will be select * from <table-name> anytime, because the insert method is a generic method, and not a query builder method on the model.

'query' => $query->toBase()->toSql()

@eggnaube
Copy link
Author

As an alternative, only add the table name, on which the insert is performed:

'table' => $query->toBase()->from,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant