18 lines
311 B
PHP
18 lines
311 B
PHP
<?php
|
|
|
|
namespace Api\Logout;
|
|
|
|
use Khofmann\Api\Api;
|
|
use \Khofmann\Models\User\User;
|
|
use Khofmann\Request\Request;
|
|
use Khofmann\Response\Response;
|
|
|
|
class Logout extends Api
|
|
{
|
|
public function post()
|
|
{
|
|
$token = Request::header("token");
|
|
return Response::json(User::getByToken($token)->logOut());
|
|
}
|
|
}
|