How to perform a delete operation on a Model?
You can put this code for example in controller.
You can use
$user = User::find($id); $user->delete();
if you don't use SoftDeletingTrait
trait or
$user = User::find($id); $user->forceDelete();
if you do, and you want to really remove user from database, not just hide it from results.
More you can read at Laravel page
Several ways to do this.
If your controller defines the user as an argument:
public function destroy(User $user) { return $user->delete();}
You can also delete any user by $id:
User::destroy ($id);
Assuming you're wrapping these routes with some security.
Edit: Corrected spelling