learning-center/app/Auth/Controllers/LogoutController.php
2024-09-08 13:48:26 +03:00

23 lines
363 B
PHP

<?php
declare(strict_types=1);
namespace App\Auth\Controllers;
use App\Auth\Models\Auth;
final class LogoutController extends \Phalcon\Mvc\Controller
{
public function execAction(): void
{
$this->getAuth()->logout();
$this->response->redirect('/');
}
private function getAuth(): Auth
{
return new Auth();
}
}