Skip to content
This repository was archived by the owner on Jul 25, 2023. It is now read-only.

AppVentus/MultiDomainBundle

Repository files navigation

MultiDomainBundle

This bundle provide multiple domain behavior for Symfony2 applications.

Installation

add

{
    "require": {
        "appventus/multi-domain-bundle": "dev-master",
    }
}

in your composer.json or composer require appventus/multi-domain-bundle

register the bundle adding it to your bundles.php file

return [
	[...]
	AppVentus\MultiDomainBundle\AvMultiDomainBundle::class => ['all' => true],
];

and add the DomainTrait to all your domain managed entities:

/**
* Page
*
* @ORM\Table()
* @ORM\Entity
*/
class Page
{
    use \AppVentus\MultiDomainBundle\Traits\DomainTrait;
    
    [...]
}

Annnnnnd, it's done !

Your Page entity will now be available only if his domain is the same as the request domain.

Have fun !

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages