If it's ver 4.2, then in case you don't use SoftDeletingTrait
in your model, you call forceDelete
method of the Eloquent\Builder
, which runs delete on the query.
In your case the query has no constraints, so it deletes all the rows.
Not sure why you get the 1st query though.
I'm not using SoftDeletingTrait in my model, i'll stick to delete() method i was just asking if this was a bug on Laravel or something.
1st query is because:
$deletetodo = Todo::find($id);
Obviously... I'm tired! I saw there DELETE
not SELECT
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community