src/Aindong/Pluggables/Pluggables.php
protected function getJsonContents($pluggable)
    {
        $pluggable = Str::studly($pluggable);
        $default = [];

        if (!$this->pathExists($pluggable)) {
            return $default;
        }

        $path = $this->getJsonPath($pluggable);

        if ($this->files->exists($path)) {
            $contents = $this->files->get($path);

            return json_decode($contents, true);
        } else {
            $message = "Pluggable [{$pluggable}] must have a valid pluggable.json file.";

            throw new FileNotFoundException($message);
        }
    }
protected function getJsonContents($pluggable)
    {
        $pluggable = Str::studly($pluggable);
        $default = [];

        if (!$this->pathExists($pluggable)) {
            return $default;
        }

        $path = $this->getJsonPath($pluggable);

        if ($this->files->exists($path)) {
            $contents = $this->files->get($path);

            return json_decode($contents, true);
        } else {
            $message = "Pluggable [{$pluggable}] must have a valid pluggable.json file.";

            throw new FileNotFoundException($message);
        }
    }
protected function getJsonContents ( $ pluggable ) { $ pluggable = Str :: studly ( $ pluggable ) ; $ default = [ ] ; if ( ! $ this -> pathExists ( $ pluggable ) ) { return $ default ; } $ path = $ this -> getJsonPath ( $ pluggable ) ; if ( $ this -> files -> exists ( $ path ) ) { $ contents = $ this -> files -> get ( $ path ) ; return json_decode ( $ contents , true ) ; } else { $ message = "Pluggable [{$pluggable}] must have a valid pluggable.json file." ; throw new FileNotFoundException ( $ message ) ; } }
Get pluggable JSON content as an array.

@param string $pluggable

@throws FileNotFoundException

@return array|mixed
Get pluggable JSON content as an array .