I am trying to install using Lumen 5.4 but I keep getting this error There are no commands defined in the "vendor" namespace.
.
Steps I have taken
1) Add "zizaco/entrust": "5.2.x-dev"
to composer.json
2) Add $app->register(Zizaco\Entrust\EntrustServiceProvider::class);
too app.php
3) composer update
4) Create this helpers.php file
if ( ! function_exists('config_path'))
{
/**
* Get the configuration path.
*
* @param string $path
* @return string
*/
function config_path($path = '')
{
return app()->basePath() . '/config' . ($path ? '/' . $path : $path);
}
}
5) Add this to composer.json
"autoload": {
"files": [
"app/helpers.php"
]
}
6) Comment out //$this->bladeDirectives();
in EntrustServiceProvider.php
7) Changed the publish function to
$this->publishes([
- __DIR__.'/../config/config.php' => config_path('entrust.php'),
+ __DIR__.'/../config/config.php' => app()->basePath() . '/config/entrust.php',
]);
8) composer dump-autoload -o
9) php artisan vendor:publish
Error
Fatal error: Call to undefined function Zizaco\Entrust\config_path() in /Users/API/vendor/zizaco/entrust/src/Entrust/EntrustServiceProvider.php on line 31
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined function Zizaco\Entrust\config_path()
Fixed the error by installing this package and than installing entrust