/**
  * Execute the console command.
  */
 public function handle()
 {
     $this->makeDir('Settings');
     $namespace = NameResolver::getAppNamespace() . 'Settings';
     $resourceName = ucfirst($this->argument('resource'));
     $this->writeConfig($namespace, $resourceName);
     $this->info("{$resourceName} settings file successfully created!");
 }
 /**
  * Execute the console command.
  */
 public function handle()
 {
     $this->makeDir('Settings');
     $this->makeDir('Settings/Resources');
     $namespace = NameResolver::getAppNamespace() . 'Settings\\Resources';
     $this->writeRulesFile($namespace);
     $this->info('Rules file successfully created!');
 }
 /**
  * Get the settings class name.
  *
  * @return string
  */
 protected function getSettingsConfig()
 {
     if (isset($this->settingsConfig)) {
         $fullNamespace = $this->settingsConfig;
     } else {
         $className = $this->getShortClassName();
         $fullNamespace = NameResolver::makeConfigFileName($className);
     }
     if (class_exists($fullNamespace)) {
         return new $fullNamespace();
     }
     throw ResourceNotFound::resourceConfigNotFound($fullNamespace);
 }
 /**
  * User defined rule method exists.
  *
  * @param string $method
  *
  * @return bool
  */
 protected function userDefinedExists($method)
 {
     $userDefined = NameResolver::makeRulesFileName();
     return class_exists($userDefined) && method_exists($userDefined, $method);
 }