Dec 29, 2016
4
Level 1
Return value from query builder delete?
Decided to ask this question in the Eloquent section because inexplicably there's no generic "database" channel. Not everyone uses Eloquent.
Anyway, I'm using the query builder (not eloquent) and trying to figure out how to determine if a delete succeeds or not. What I'm expecting is a return of the number of rows that the delete affected. 0 if the delete failed, 1 to N if it succeeded. Yet neither the laravel documentation nor the API documentation explain exactly what to expect.
Can anyone confirm that delete returns the number of rows deleted?
Please or to participate in this conversation.