public function installed(string $package): bool
    {
        $manifest = $this->files->get('composer.json');
        $manifest = json_decode($manifest, true);

        return collect($manifest['require'])
            ->merge($manifest['require-dev'])
            ->keys()
            ->contains($package);
    }
public function installed(string $package): bool
    {
        $manifest = $this->files->get('composer.json');
        $manifest = json_decode($manifest, true);

        return collect($manifest['require'])
            ->merge($manifest['require-dev'])
            ->keys()
            ->contains($package);
    }
public function installed ( string $ package ) : bool { $ manifest = $ this -> files -> get ( 'composer.json' ) ; $ manifest = json_decode ( $ manifest , true ) ; return collect ( $ manifest [ 'require' ] ) -> merge ( $ manifest [ 'require-dev' ] ) -> keys ( ) -> contains ( $ package ) ; }
Determine if package already installed.

@param string $package

@return bool
@throws \Illuminate\Contracts\Filesystem\FileNotFoundException
Determine if package already installed .