I have an entity named verified
in my table user
. I would like if verified is null
to show this [you can upload your application], if verified =2
to show this [your application is in process], if verified =3
your application has been verified.
but for now if verified =3
is showing the message of verified =2.
This is what i have done:
{% if entity.verified is empty %}
<p>
you can upload your application
</p>
{% elseif entity.verified|length !=2 %}
<p>
your application is in process
</p>
{% elseif entity.verified|length !=3 %}
<p>
your application has been verified
</p>
{% endif %}
User.php
/**
*
* @ORM\Column(name="verified", type="decimal", options={"default" : 0}, nullable=true)
*/
protected $verified;
/**
* Set verified
*
* @param string $verified
* @return User
*/
public function setVerified($verified)
{
$this->verified = $verified;
return $this;
}
/**
* Get verified
*
* @return string
*/
public function getVerified()
{
return $this->verified;
}