<?php

namespace App\Http\Controllers\User;
// use Illuminate\Support\Facades\Log;

class Logout {
  public function index () {
    if (isset($_COOKIE['kero_token'])) {
      unset($_COOKIE['kero_token']);
      setcookie('kero_token', '', time() - 3600, '/', $_SERVER['HTTP_HOST'], 0, 1);
    }

    return redirect('');
  }
}