Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ad2b5f
commit 5a03b7b
Showing
7 changed files
with
456 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "pabloacastillo/ruc-paraguay", | ||
"description": "Fetch, search and retrieve RUC codes from the official taxes database from SET. Descargar, buscar y brindar información sobre los numeros de RUC desde la fuente oficial del SET en Paraguay.", | ||
"type": "library", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Pablo A. Castillo", | ||
"email": "pabloacastillo@gmail.com" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"require": { | ||
"guzzlehttp/guzzle": "^6.5@dev" | ||
}, | ||
"autoload":{ | ||
"psr-4":{ | ||
"pabloacastillo\\RUCParaguay\\":"src/" | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
|
||
class RUCParaguayCmd extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'command:name'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Command description'; | ||
|
||
/** | ||
* Create a new command instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
} | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return mixed | ||
*/ | ||
public function handle() | ||
{ | ||
// | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace pabloacastillo\RUCParaguay\Http\Controllers; | ||
|
||
use App\Http\Controllers\Controller; | ||
|
||
class RucpyController extends Controller | ||
{ | ||
// | ||
protected $url='http://www.set.gov.py/rest/contents/download/collaboration/sites/PARAGUAY-SET/documents/informes-periodicos/ruc/'; | ||
|
||
|
||
public function Download(){ | ||
$storagePath = Storage::disk('local')->path('ruc-paraguay'); | ||
$client = new \GuzzleHttp\Client(); | ||
|
||
for($i=0;$i<=9;$i++){ | ||
$file_path='ruc'.$i.'.zip'; | ||
$URL = ($this->url).$file_path; | ||
$client = new Client(); | ||
|
||
$response = $client->request('GET',$URL, ['save_to' => $storagePath.'/'.$file_path]); | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.