I want to check what environment the application is in, and then declare a specific binary config.
The file is located within the /config/ folder.
At the moment, this is what I have:
<?php
if (App::environment('local')) {
return array(
'pdf' => array(
'enabled' => true,
'binary' => base_path('vendor/profburial/wkhtmltopdf-binaries-osx/bin/wkhtmltopdf-amd64-osx'),
'timeout' => false,
'options' => array(),
'env' => array(),
),
} else {
// The environment is production
}
);
But it's returning an error (blank page).
How can I inherit the App
class to use it?
Thank you.
<?php
if (env('APP_ENV') == 'local')
{
return array (
'pdf' => array(
'enabled' => true,
'binary' => base_path('vendor/profburial/wkhtmltopdf-binaries-osx/bin/wkhtmltopdf-amd64-osx'),
'timeout' => false,
'options' => array(),
'env' => array(),
)
);
} else {
// Not local environment...
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.