src/LaravelPanel/models/Form.php
private function header()
    {
        $fields = collect($this->entity->fields)->unique('type')->all();
        $codeArray = [];

        foreach ($fields as $name => $options) {
            $type = ucwords($options['type']);
            $className = 'Jaimeeee\\Panel\\Fields\\'.$type.'\\'.$type.'Field';

            if (method_exists($className, 'header')) {
                $codeArray[] = '  '.$className::header();
            }
        }

        return implode(chr(10), $codeArray);
    }
private function header()
    {
        $fields = collect($this->entity->fields)->unique('type')->all();
        $codeArray = [];

        foreach ($fields as $name => $options) {
            $type = ucwords($options['type']);
            $className = 'Jaimeeee\\Panel\\Fields\\'.$type.'\\'.$type.'Field';

            if (method_exists($className, 'header')) {
                $codeArray[] = '  '.$className::header();
            }
        }

        return implode(chr(10), $codeArray);
    }
private function header ( ) { $ fields = collect ( $ this -> entity -> fields ) -> unique ( 'type' ) -> all ( ) ; $ codeArray = [ ] ; foreach ( $ fields as $ name => $ options ) { $ type = ucwords ( $ options [ 'type' ] ) ; $ className = 'Jaimeeee\\Panel\\Fields\\' . $ type . '\\' . $ type . 'Field' ; if ( method_exists ( $ className , 'header' ) ) { $ codeArray [ ] = '  ' . $ className :: header ( ) ; } } return implode ( chr ( 10 ) , $ codeArray ) ; }
Return each fields' header code.

@return string
Return each fields header code .