是否有机会使用 EasyAdmin 实现的字段禁用用户的字段?
我想向用户显示“isPaid”的布尔值,但我不想让他改变它,只给他看(支付网关这样做)
谢谢你的帮助!
我目前正在努力解决我的网络项目的问题。
我已经通过“bin/console make:entity”命令创建了一个“凭证”实体,我想进行迁移以写入数据库。但是 Doctrine 抛出了一个奇怪的错误,我不知道如何修复它。谁能帮我?
Symfony 4.4.10 和 Doctrine 1.4
错误:
在 ClassNameGenerator.php 第 14 行中:传递给 Doctrine\Migrations\Generator\ClassNameGenerator::generateClassName() 的参数 1 必须是字符串类型,给定 null,在 /var/www/skodanezajit/vendor/doctrine/migrations/lib/ 中调用Doctrine/Migrations/Tool s/Console/Command/DiffCommand.php 第 139 行
优惠券实体:
<?php
namespace App\Entity;
use App\Repository\VoucherRepository;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=VoucherRepository::class)
*/
class Voucher
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $code;
/**
* @ORM\Column(type="datetime")
*/
private $dateCreated;
/**
* @ORM\Column(type="datetime")
*/
private $lastsTo;
/**
* @ORM\Column(type="integer")
*/
private …Run Code Online (Sandbox Code Playgroud)