mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 19:04:36 -04:00
Temp routes"
This commit is contained in:
parent
78e5a91175
commit
3a78326a83
@ -77,8 +77,6 @@ class Phantom
|
|||||||
$phantom_url = "https://phantomjscloud.com/api/browser/v2/{$key}/?request=%7Burl:%22{$url}%22,renderType:%22pdf%22%7D";
|
$phantom_url = "https://phantomjscloud.com/api/browser/v2/{$key}/?request=%7Burl:%22{$url}%22,renderType:%22pdf%22%7D";
|
||||||
$pdf = CurlUtils::get($phantom_url);
|
$pdf = CurlUtils::get($phantom_url);
|
||||||
|
|
||||||
//info($pdf);
|
|
||||||
|
|
||||||
Storage::makeDirectory($path, 0775);
|
Storage::makeDirectory($path, 0775);
|
||||||
|
|
||||||
$instance = Storage::disk(config('filesystems.default'))->put($file_path, $pdf);
|
$instance = Storage::disk(config('filesystems.default'))->put($file_path, $pdf);
|
||||||
@ -92,9 +90,9 @@ class Phantom
|
|||||||
Cache::put($hash, $html, 300);
|
Cache::put($hash, $html, 300);
|
||||||
|
|
||||||
$url = route('tmp_pdf', ['hash' => $hash]);
|
$url = route('tmp_pdf', ['hash' => $hash]);
|
||||||
|
info($url);
|
||||||
$key = config('ninja.phantomjs_key');
|
$key = config('ninja.phantomjs_key');
|
||||||
$phantom_url = "https://phantomjscloud.com/api/browser/v2/{$key}/?request=%url:%22{$url}%22,renderType:%22pdf%22%7D";
|
$phantom_url = "https://phantomjscloud.com/api/browser/v2/{$key}/?request=%7Burl:%22{$url}%22,renderType:%22pdf%22%7D";
|
||||||
$pdf = CurlUtils::get($phantom_url);
|
$pdf = CurlUtils::get($phantom_url);
|
||||||
|
|
||||||
$response = Response::make($pdf, 200);
|
$response = Response::make($pdf, 200);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user