PHP code example of sgi-software / api-ruc

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

    

sgi-software / api-ruc example snippets



class RucController extends Controller
{
    public function __construct()
    {
        $this->middleware('auth');
    }

    /**
     * Devuelve los datos del contribuyente si este se encuentra registrado en la SET.
     * @return mixed
     */
    public function get($rucn)
    {
        return (new ApiCall)->obtenerSiExiste($rucn);
    }
}