Skip to content

Unable to install config('openapi.collections') Invalid argument supplied for foreach() #27

@roncodes

Description

@roncodes

When trying to install using composer require, I receive this error below:

ErrorException 

  Invalid argument supplied for foreach()

  at vendor/vyuldashev/laravel-openapi/routes/api.php:8
      4▕ use Illuminate\Support\Facades\Route;
      5▕ use Vyuldashev\LaravelOpenApi\Http\OpenApiController;
      6▕ 
      7▕ Route::group(['as' => 'openapi.'], function () {
  ➜   8▕     foreach (config('openapi.collections') as $name => $config) {
      9▕         $uri = Arr::get($config, 'route.uri');
     10▕ 
     11▕         if (! $uri) {
     12▕             continue;

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

      +5 vendor frames 
  21  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

I also tried copying the openapi config file first, but still no luck.

PHP Version: 7.4
Laravel Version: 8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions