igoshev / laravel-captcha

Captcha integration for the Laravel
https://laravel.bonecms.tech/laravel-captcha
MIT License
79 stars 35 forks source link

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

Closed imannms closed 3 years ago

imannms commented 3 years ago

I get the following error when installing this package: The directive name [] is not valid. Directive names must only contain alphanumeric characters and underscores.

But, I already found a workaround for this.

How to fix this:

  1. If you already installing the package with composer require bonecms/laravel-captcha, then you need to uninstall the package first with composer remove bonecms/laravel-captcha
  2. Remove the cached configuration with php artisan config:clear.
  3. Install the package, composer require bonecms/laravel-captcha
  4. Re-cache the config, php artisan config:cache
  5. Done.

References: https://stackoverflow.com/questions/65464010/the-directive-name-is-not-valid-directive-names-must-only-contain-alphanumer