public function install($type, array $attributes)
    {
        $extension       = new Extension;
        $extension->type = $type;
        $extension->name = $attributes['name'];
        if (isset($attributes['parameters'])) {
            $extension->parameters = $attributes['parameters'];
        }
        $extension->manifest = json_encode($attributes);
        $extension->save();

        return $extension;
    }
public function install($type, array $attributes)
    {
        $extension       = new Extension;
        $extension->type = $type;
        $extension->name = $attributes['name'];
        if (isset($attributes['parameters'])) {
            $extension->parameters = $attributes['parameters'];
        }
        $extension->manifest = json_encode($attributes);
        $extension->save();

        return $extension;
    }
public function install ( $ type , array $ attributes ) { $ extension = new Extension ; $ extension -> type = $ type ; $ extension -> name = $ attributes [ 'name' ] ; if ( isset ( $ attributes [ 'parameters' ] ) ) { $ extension -> parameters = $ attributes [ 'parameters' ] ; } $ extension -> manifest = json_encode ( $ attributes ) ; $ extension -> save ( ) ; return $ extension ; }
Install an extension.

@param string $type
@param array $attributes
@return \Yajra\CMS\Entities\Extension
Install an extension .