classes/Models/Base.php
protected function makeVisibilityAction($data)
    {
        extract($data);

        // Check if this model supports editing the visibility
        if ($many_to_many
            || !app('decoy.user')->can('publish', $controller)
            || !array_key_exists('public', $this->attributes)) {
            return;
        }

        // Create the markup
        $public = $this->getAttribute('public');
        return sprintf('<a class="visibility js-tooltip" data-placement="left" title="%s">
                <span class="glyphicon glyphicon-eye-%s"></span>
            </a>',
            $public ? __('decoy::base.standard_list.private') : __('decoy::base.standard_list.publish'),
            $public ? 'open' : 'close'
        );
    }
protected function makeVisibilityAction($data)
    {
        extract($data);

        // Check if this model supports editing the visibility
        if ($many_to_many
            || !app('decoy.user')->can('publish', $controller)
            || !array_key_exists('public', $this->attributes)) {
            return;
        }

        // Create the markup
        $public = $this->getAttribute('public');
        return sprintf('<a class="visibility js-tooltip" data-placement="left" title="%s">
                <span class="glyphicon glyphicon-eye-%s"></span>
            </a>',
            $public ? __('decoy::base.standard_list.private') : __('decoy::base.standard_list.publish'),
            $public ? 'open' : 'close'
        );
    }
protected function makeVisibilityAction ( $ data ) { extract ( $ data ) ; // Check if this model supports editing the visibility if ( $ many_to_many || ! app ( 'decoy.user' ) -> can ( 'publish' , $ controller ) || ! array_key_exists ( 'public' , $ this -> attributes ) ) { return ; } // Create the markup $ public = $ this -> getAttribute ( 'public' ) ; return sprintf ( '<a class="visibility js-tooltip" data-placement="left" title="%s">
                <span class="glyphicon glyphicon-eye-%s"></span>
            </a>' , $ public ? __ ( 'decoy::base.standard_list.private' ) : __ ( 'decoy::base.standard_list.publish' ) , $ public ? 'open' : 'close' ) ; }
Make the visibility state action

@param  array  $data The data passed to a listing view
@return string
Make the visibility state action