public function getPackages()
    {
        $this->start();
        try {
            $this->getUserControl()->checkRateLimit();
            $this->getUserControl()->checkGenericAccess(__FUNCTION__);
            $repo = $this->app->make(PackageRepository::class);
            $packages = $repo->createQueryBuilder('p')
                ->select('p.handle, p.name')
                ->getQuery()->getArrayResult();
            $result = $this->buildJsonResponse($packages);
        } catch (Exception $x) {
            $result = $this->buildErrorResponse($x);
        } catch (Throwable $x) {
            $result = $this->buildErrorResponse($x);
        }

        return $this->finish($result);
    }
public function getPackages()
    {
        $this->start();
        try {
            $this->getUserControl()->checkRateLimit();
            $this->getUserControl()->checkGenericAccess(__FUNCTION__);
            $repo = $this->app->make(PackageRepository::class);
            $packages = $repo->createQueryBuilder('p')
                ->select('p.handle, p.name')
                ->getQuery()->getArrayResult();
            $result = $this->buildJsonResponse($packages);
        } catch (Exception $x) {
            $result = $this->buildErrorResponse($x);
        } catch (Throwable $x) {
            $result = $this->buildErrorResponse($x);
        }

        return $this->finish($result);
    }
public function getPackages ( ) { $ this -> start ( ) ; try { $ this -> getUserControl ( ) -> checkRateLimit ( ) ; $ this -> getUserControl ( ) -> checkGenericAccess ( __FUNCTION__ ) ; $ repo = $ this -> app -> make ( PackageRepository :: class ) ; $ packages = $ repo -> createQueryBuilder ( 'p' ) -> select ( 'p.handle, p.name' ) -> getQuery ( ) -> getArrayResult ( ) ; $ result = $ this -> buildJsonResponse ( $ packages ) ; } catch ( Exception $ x ) { $ result = $ this -> buildErrorResponse ( $ x ) ; } catch ( Throwable $ x ) { $ result = $ this -> buildErrorResponse ( $ x ) ; } return $ this -> finish ( $ result ) ; }
Get the list of packages.

@return Response

@example http://www.example.com/api/packages/
Get the list of packages .