Collective\Annotations\AnnotationsServiceProvider::routeScans PHP Method

routeScans() public method

Get the classes to be scanned by the provider.
public routeScans ( ) : array
return array
    public function routeScans()
    {
        if ($this->scanEverything) {
            return $this->getAllClasses();
        }
        $classes = $this->scanRoutes;
        // scan the controllers namespace if the flag is set
        if ($this->scanControllers) {
            $classes = array_merge($classes, $this->getClassesFromNamespace($this->getAppNamespace() . 'Http\\Controllers'));
        }
        return $classes;
    }

Usage Example

 /**
  * Get the route definitions for the annotations.
  *
  * @return string
  */
 protected function getRouteDefinitions()
 {
     $scanner = $this->laravel->make('annotations.route.scanner');
     $scanner->setClassesToScan($this->provider->routeScans());
     return '<?php ' . PHP_EOL . PHP_EOL . $scanner->getRouteDefinitions() . PHP_EOL;
 }