EmiaNakib
1 month ago
109
2
Laravel

How to delete this user?

Posted 1 month 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.