PHP code example of gonzaloalonsod / afip-bundle

1. Go to this page and download the library: Download gonzaloalonsod/afip-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gonzaloalonsod / afip-bundle example snippets




return [
    // ...
    Gonzaloalonsod\AfipBundle\AfipBundle::class => ['all' => true],
];




namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;

use Gonzaloalonsod\AfipBundle\Controller\AfipController;

class AppController extends AbstractController
{
    /**
     * @Route("/app", name="app")
     */
    public function index(AfipController $afip)
    {
        dump($afip->getWS());

        return $this->render('app/index.html.twig', [
            'controller_name' => 'AppController',
        ]);
    }
}


...
use Gonzaloalonsod\AfipBundle\Controller\AfipController;
...
    public function index()
    {
        $afip = $this->container->get(AfipController::class);
    }
...