server icon indicating copy to clipboard operation
server copied to clipboard

php artisan route:clear command throws InvalidArgumentException

Open nizigama opened this issue 4 years ago • 3 comments

whenever I try to clear the route caches with rpc endpoint, i get the InvalidArgumentException exception


   InvalidArgumentException 

  Attribute [rpc] does not exist.

  at vendor/laravel/framework/src/Illuminate/Routing/RouteRegistrar.php:107
    103▕      */
    104▕     public function attribute($key, $value)
    105▕     {
    106▕         if (! in_array($key, $this->allowedAttributes)) {
  ➜ 107▕             throw new InvalidArgumentException("Attribute [{$key}] does not exist.");
    108▕         }
    109▕ 
    110▕         if ($key === 'middleware') {
    111▕             foreach ($value as $index => $middleware) {

      +2 vendor frames 
  3   routes/api.php:28
      Illuminate\Support\Facades\Facade::__callStatic()

      +4 vendor frames 
  8   app/Providers/RouteServiceProvider.php:46
      Illuminate\Routing\RouteRegistrar::group()

nizigama avatar Nov 23 '22 10:11 nizigama

I can't reproduce the problem you describe. I am using the following versions:

"laravel/framework": "v9.41.0"
"sajya/server": "5.3.0"

Do you have any details?

tabuna avatar Nov 23 '22 17:11 tabuna

I amusing the following versions:

"laravel/framework": "^8.75"
"sajya/server": "4.0.5"

nizigama avatar Nov 23 '22 17:11 nizigama

My bad, turns out that composer hadn't installed the package properly 😕

nizigama avatar Nov 24 '22 18:11 nizigama