I think you do not understand what this goal is. This is just a shortcut to the example you showed. If you have a user ID, you can delete it without writing this where clause.
DB::table('users')->delete($id);
The above is identical to this:
DB::table('users')->where('id', $id)->delete();
You obviously did a check before using any of these methods to ensure that a valid identifier was provided. I would not say that this is a security breach, just what you, as a developer, should know when developing your application. You do not just go willy-nilly, deleting things without first checking the input.
Jason lewis
source share