问题描述
我如何在Symfony的注解中与ApiPlateform一起使用OrderBy createdAt并使用TimestampableEntity?
那是我想要的实体。
能帮我吗?
/**
* @ApiResource(
* attributes={"order"={"createdAt": "DESC"}},* )
* @ORM\Entity(repositoryClass=CommentRepository::class)
*/
class Comment
{
use TimestampableEntity;
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
* @Groups({"get:etb:vall"})
*/
private $id;
/**
* @ORM\Column(type="text")
* @Groups({"get:etbs","get:etb:vall"})
*/
private $content;
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)