mardi 28 août 2018

Change column value if user logout Laravel

How do I change the value of my fields when the user logout?

public function logout(Request $request, $user) {

 // $user = Auth::user();

 $conn = DB::select("show full processlist");

 foreach($conn as $con){
   $user->connID = null;
   $user->connDate =null;
   $user->last_login_ip = null;
   $user->update();
   $user = Auth::logout();
  }

}

I want it like that but i had some error 'Too few arguments to function App\Http\Controllers\Auth\LoginController::logout(), 1 passed and exactly 2 expected'.

Any Idea?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire