/** * Register the service provider. */ public function register() { $this->mergeConfigFrom($this->configPath(), 'eloquent-extra'); $this->app->bind('command.eloquent-extra.logging-table', function (Application $app) { return new Logging\TableCommand($app->make('migration.creator'), $app->make('composer')); }, true); $this->app->bind('command.eloquent-extra.properties-table', function (Application $app) { return new Properties\MakeMigrationCommand($app->make('migration.creator'), $app->make('composer')); }, true); $this->commands('command.eloquent-extra.logging-table'); $this->commands('command.eloquent-extra.properties-table'); $types = (array) $this->app->make('config')->get('eloquent-extra.property_types', []); foreach ($types as $type => $class) { Factory::registerType($type, $class); } }
public function setUp() { parent::setUp(); Factory::registerType(Factory::TYPE_INTEGER, Values\IntegerValue::class); $this->factory = new Factory(new ContactProperties()); }