I have an Entity called Shop in which it has a property called domainURL. In my twig I did the following:
<a href="{{ shop.getSubdomain() }}">
However this always appends my root directory to the subdomain resulting in:
www.mydomain.com/somesubdomain.test.com
How can I just get the URL?
Here's the code for getSubdomain():
/**
* @ORM\Column(name="subdomain", type="string", length=50, nullable=true)
*/
protected $subdomain;
/**
* Get subdomain
*
* @return string
*/
public function getSubdomain()
{
return $this->subdomain;
}