protected function fillDataForEmpty()
    {
        // Fill list references if they are empty
        $fields = [];

        // Add fields for attributes
        foreach ($this->info->attributes as $attribute) {

            if ($attribute->hidden || ! $this->shouldAttributeBeDisplayedByDefault($attribute, $this->info)) {
                continue;
            }

            $fields[ $attribute->name ] = $this->makeModelShowFieldDataForAttributeData($attribute, $this->info);
        }

        // Add fields for relations?
        // Perhaps, though it may be fine to leave this up to manual configuration.
        // todo: consider


        $this->info->show->fields = $fields;
    }
protected function fillDataForEmpty()
    {
        // Fill list references if they are empty
        $fields = [];

        // Add fields for attributes
        foreach ($this->info->attributes as $attribute) {

            if ($attribute->hidden || ! $this->shouldAttributeBeDisplayedByDefault($attribute, $this->info)) {
                continue;
            }

            $fields[ $attribute->name ] = $this->makeModelShowFieldDataForAttributeData($attribute, $this->info);
        }

        // Add fields for relations?
        // Perhaps, though it may be fine to leave this up to manual configuration.
        // todo: consider


        $this->info->show->fields = $fields;
    }
protected function fillDataForEmpty ( ) { // Fill list references if they are empty $ fields = [ ] ; // Add fields for attributes foreach ( $ this -> info -> attributes as $ attribute ) { if ( $ attribute -> hidden || ! $ this -> shouldAttributeBeDisplayedByDefault ( $ attribute , $ this -> info ) ) { continue ; } $ fields [ $ attribute -> name ] = $ this -> makeModelShowFieldDataForAttributeData ( $ attribute , $ this -> info ) ; } // Add fields for relations? // Perhaps, though it may be fine to leave this up to manual configuration. // todo: consider $ this -> info -> show -> fields = $ fields ; }
Fills field data if no custom data is set.
Fills field data if no custom data is set .