我正在使用此软件包 https://github.com/barryvdh/laravel-snappy
要生成pdf文件,我会跟踪文档进行安装,但我收到此错误
Config / snappy.php
const apiURL = 'https://jsonplaceholder.typicode.com/todos/1';
const badURL = 'zhttps://wcaf.fajfkajf.gg'
async function getData(url){
try {
const response = await fetch(url);
const json = await response.json();
console.log(json);
} catch (e) {
console.log('cannot load api');
}
}
getData(apiURL);
getData(badURL);
PrintCntroller
<?php
return array(
'pdf' => array(
'enabled' => true,
'binary' => base_path('vendor/h4cc/wkhtmltopdf-i386/bin/wkhtmltopdf-i386'),
'timeout' => false,
'options' => array(),
'env' => array(),
),
);
答案 0 :(得分:0)
一个现金问题:(我用这个解决了
php artisan config:cache
php artisan cache:clear