Ejemplo n.º 1
0
 public function loadEnvironmentConfig($environment)
 {
     $file = $this->app->config()['paths']['config']->expand('environments', $environment . '.php');
     if (!is_file($file)) {
         throw new \InvalidArgumentException(sprintf("Configuration file for environment '%s' not found: %s", $environment, $file));
     }
     $configurer = (require $file);
     $configurer($this->app->config());
     if ($this->connectionManagerSetUp) {
         PersistedModel::connectionManager()->setDefaultConnection($environment);
     }
 }
Ejemplo n.º 2
0
 protected function deleteOrDestroy(array $options = [])
 {
     return $this->transaction(function () use($options) {
         return parent::deleteOrDestroy($options);
     });
 }