JeroenG\Packager\PackagerListCommand::handle PHP Method

handle() public method

Execute the console command.
public handle ( ) : mixed
return mixed
    public function handle()
    {
        $composer = json_decode(file_get_contents('composer.json'), true);
        $packages = [];
        foreach ($composer['autoload']['psr-4'] as $package => $path) {
            if ($package !== 'App\\') {
                $packages[] = [rtrim($package, '\\'), $path];
            }
        }
        $headers = ['Package', 'Path'];
        $this->table($headers, $packages);
    }
PackagerListCommand