public function make()
    {
        try {
            $args = func_get_args();
            $active = $args[1]['active'] ?? true;

            // If widget has non active status.
            if (! $active) {
                return false;
            }

            $this->widgetName = trim((string) array_shift($args));
            $this->widgetParams = (array) array_shift($args);
            $this->widget = $this->getWidget();

            return $this->getContentFromCache();
        } catch (\Exception $e) {
            return sprintf(
                trans('common.msg.error'), $e->getMessage()
            );
        }
    }
public function make()
    {
        try {
            $args = func_get_args();
            $active = $args[1]['active'] ?? true;

            // If widget has non active status.
            if (! $active) {
                return false;
            }

            $this->widgetName = trim((string) array_shift($args));
            $this->widgetParams = (array) array_shift($args);
            $this->widget = $this->getWidget();

            return $this->getContentFromCache();
        } catch (\Exception $e) {
            return sprintf(
                trans('common.msg.error'), $e->getMessage()
            );
        }
    }
public function make ( ) { try { $ args = func_get_args ( ) ; $ active = $ args [ 1 ] [ 'active' ] ?? true ; // If widget has non active status. if ( ! $ active ) { return false ; } $ this -> widgetName = trim ( ( string ) array_shift ( $ args ) ) ; $ this -> widgetParams = ( array ) array_shift ( $ args ) ; $ this -> widget = $ this -> getWidget ( ) ; return $ this -> getContentFromCache ( ) ; } catch ( \ Exception $ e ) { return sprintf ( trans ( 'common.msg.error' ) , $ e -> getMessage ( ) ) ; } }
Generate a widget.

@return mixed
Generate a widget .