Nice question... Wat is the problem? What error do you get? Show some code? Follow these guidelines for posting on the forum: https://laracasts.com/discuss/channels/general-discussion/guidelines-for-posting-on-laracastscom
¿how use laravel-excel on lumen? i have a problem with the service provider
I have a error with the config_path helper
Sure !!
composer.json:
"maatwebsite/excel": "~2.0.0"
bootstrap/app.php:
class_alias('Maatwebsite\Excel\Facades\Excel', 'Excel');
$app->withFacades();
$app->register('Maatwebsite\Excel\ExcelServiceProvider');
Error:
Fatal error: Call to undefined function Maatwebsite\Excel\config_path() in C:\xampp\htdocs\lumen\vendor\maatwebsite\excel\src\Maatwebsite\Excel\ExcelServiceProvider.php on line 45
ExcelServiceProvider.php on line 45:
$this->publishes([
__DIR__ . '/../../config/excel.php' => config_path('excel.php'),
]);
thanks for the help.
Did you create the config file in the config directory? It's looking for a config file! Also some packages don't fully support Lumen and are pointed to Laravel only!
There's no config folder in Lumen. Thus there's no config_path() function.
I was having similar problems using http://datatables.yajrabox.com with Lumen. I was getting the following error.
"[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined function yajra\Datatables\config_path()"
I was able to resolve this by following information under "Improving Lumen" on http://laravelista.com/json-web-token-authentication-for-lumen/
Please or to participate in this conversation.