Newer
Older
<?php
namespace App\Service\Response\Classes;
use Symfony\Component\Serializer\Annotation\Groups;
class TokenResponse extends Response
{
/**
* @var array
*/
#[Groups(["data"])]
public array $data;
public function setToken(string $token)
{
$this->data = ['token' => $token];
}
}