entrust icon indicating copy to clipboard operation
entrust copied to clipboard

Lumen 5.4 There are no commands defined in the "vendor" namespace.

Open n0490b opened this issue 8 years ago • 5 comments

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);
    }
}
  1. Add this to composer.json
        "autoload": {
            "files": [
                "app/helpers.php"
            ]
        }
  1. Comment out //$this->bladeDirectives(); in EntrustServiceProvider.php

  2. Changed the publish function to

        $this->publishes([
            -            __DIR__.'/../config/config.php' => config_path('entrust.php'),
            +            __DIR__.'/../config/config.php' => app()->basePath() . '/config/entrust.php',
        ]);
  1. composer dump-autoload -o

  2. 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()  

n0490b avatar Jun 15 '17 15:06 n0490b

There is really no vendor:publish in Lumen. Try this package: https://github.com/laravelista/lumen-vendor-publish

jsdecena avatar Jun 29 '17 08:06 jsdecena

any alternative to this library? it's abandoned

abdulmanan7 avatar Jun 14 '19 11:06 abdulmanan7

There are no plans to add such a command for Lumen. If you need a command to publish files, just use Laravel.

mntdragon avatar Jul 08 '19 23:07 mntdragon

any alternative to this library? it's abandoned

It's not abandoned as of today. Last update was less than a month ago, and I just tried it and it works fine.

Leamsi9 avatar Feb 24 '20 11:02 Leamsi9

Use this package : https://github.com/irazasyed/larasupport

mithublue avatar Sep 26 '20 19:09 mithublue