token delete laravel

Solutions on MaxInterview for token delete laravel by the best coders in the world

showing results for - "token delete laravel"
Cristóbal
31 Jun 2018
1public function logout() {
2    Auth::user()->tokens->each(function($token, $key) {
3        $token->delete();
4    });
5
6    return response()->json('Successfully logged out');
7}