EmiaNakib
2 months ago
136
2
Laravel

How to delete this user?

Posted 2 months ago by EmiaNakib

Hello im tryng to delete users, but this function dosnt work:

public function deleteUser()
{
    $user = User::find($id);
    $user ->delete();
    return redirect('empresa');
}

Error: Undefined variable: id

Please sign in or create an account to participate in this conversation.