chaplean/location-bundle

Location bundle contains Entity Region/Department/City

Installs: 862

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:symfony-bundle

v10.0.5 2019-07-09 20:11 UTC

README

Prerequisites

This version of the bundle requires Symfony 2.8+.

Installation

1. Composer

composer require chaplean/location-bundle

2. AppKernel.php

Add

new Chaplean\Bundle\LocationBundle\ChapleanLocationBundle(),

3. Inject locations

Run

bin/console location:load:cities

or Add command in migration

public function postUp(Schema $schema)
{
    /** @var Kernel $kernel */
    $kernel = $this->container->get('kernel');
    $application = new Application($kernel);
    $application->setAutoExit(false);
    

    $exitCode = $application->run(
        new ArrayInput(
            [
                'command'    => 'location:load:cities'
            ]
        )
    );
    
    $this->abortIf($exitCode !== 0, 'see Exception above ^');
}

4. Resources