Larvel - In PackageManifest.php line 122: Undefined index: name

Edit this file:

nano vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php

Find:

$packages = json_decode($this->files->get($path), true);

Replace:

$installed = json_decode($this->files->get($path), true);
$packages = $installed['packages'] ?? $installed;