coderello / laravel-shared-data

📦 An easy way to share the data from your backend to the JavaScript.
https://coderello.com/docs/laravel-shared-data/1.0/sharing-data
MIT License
321 stars 22 forks source link

Error trying to install #28

Closed itmgmt-codeCorp closed 3 years ago

itmgmt-codeCorp commented 3 years ago

Install error. issue with blade directive.

InvalidArgumentException

  The directive name [] is not valid. Directive names must only contain alphanumeric characters and underscores.

  at vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php:684
    680▕      */
    681▕     public function directive($name, callable $handler)
    682▕     {
    683▕         if (! preg_match('/^\w+(?:::\w+)?$/x', $name)) {
  ➜ 684▕             throw new InvalidArgumentException("The directive name [{$name}] is not valid. Directive names must only contain alphanumeric characters and underscores.");
    685▕         }
    686▕
    687▕         $this->customDirectives[$name] = $handler;
    688▕     }

      +19 vendor frames
  20  [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}()

      +5 vendor frames
  26  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()
ap-coder commented 3 years ago

I get same error.

ap-coder commented 3 years ago

I saw you comment on use the updated config. problem is the package is failing install before it gets to the point where we are allowed to add the config.

hivokas commented 3 years ago

@itmgmt-codeCorp @ap-coder I've published the release with the fix (https://github.com/coderello/laravel-shared-data/releases/tag/3.1.1). Please let me know if this fixed the problem.