jeudi 8 décembre 2016

why did not logout when I delete user accounts in Laravel

I need redirect logout My app when user delete Accounts. using this UserController

  public function destroy($id)
    {
            $users = User::findOrFail($id);
            $users->delete();

             Auth::logout();

            return Auth::logout();//redirect()->back()->with('info','Your Account has beed deleted successfully');
    }

My delete button is this in index.blade.php

 <button class="btn btn-circle btn-danger delete"
                      data-action=""
                      data-token="">
                <i class="fa fa-trash-o"></i>Delete
 </button>

how can I fix this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire