PHP code example of herkron / afip-bundle

1. Go to this page and download the library: Download herkron/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/ */

    

herkron / afip-bundle example snippets




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




namespace App\Controller;

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

use Gonzakpo\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 Gonzakpo\AfipBundle\Controller\AfipController;
...
    public function index()
    {
        $afip = $this->container->get(AfipController::class);
    }
...