src/Http/Presenters/IndexPresenter.php
public function getForm($eloquent, $type = null)
    {
        $classname     = $eloquent->classname;
        $model         = $eloquent->contents->first();
        $configuration = [
            'content'       => $model !== null ? $model->content : null,
            'title'         => $model !== null ? $model->title : '',
            'type'          => $eloquent->exists ? $eloquent->type->name : '',
            'form_name'     => $eloquent->name
        ];
        $notification  = app($classname ?: Notification::class);

        $fluent        = new Fluent(array_merge($configuration, array_except($eloquent->toArray(), ['type'])));
        if (!is_null($fluent->type) && $type) {
            $fluent->type = $type;
        }

        return $this->form($fluent, $notification);
    }
public function getForm($eloquent, $type = null)
    {
        $classname     = $eloquent->classname;
        $model         = $eloquent->contents->first();
        $configuration = [
            'content'       => $model !== null ? $model->content : null,
            'title'         => $model !== null ? $model->title : '',
            'type'          => $eloquent->exists ? $eloquent->type->name : '',
            'form_name'     => $eloquent->name
        ];
        $notification  = app($classname ?: Notification::class);

        $fluent        = new Fluent(array_merge($configuration, array_except($eloquent->toArray(), ['type'])));
        if (!is_null($fluent->type) && $type) {
            $fluent->type = $type;
        }

        return $this->form($fluent, $notification);
    }
public function getForm ( $ eloquent , $ type = null ) { $ classname = $ eloquent -> classname ; $ model = $ eloquent -> contents -> first ( ) ; $ configuration = [ 'content' => $ model !== null ? $ model -> content : null , 'title' => $ model !== null ? $ model -> title : '' , 'type' => $ eloquent -> exists ? $ eloquent -> type -> name : '' , 'form_name' => $ eloquent -> name ] ; $ notification = app ( $ classname ? : Notification :: class ) ; $ fluent = new Fluent ( array_merge ( $ configuration , array_except ( $ eloquent -> toArray ( ) , [ 'type' ] ) ) ) ; if ( ! is_null ( $ fluent -> type ) && $ type ) { $ fluent -> type = $ type ; } return $ this -> form ( $ fluent , $ notification ) ; }
gets form instance

@param Model $eloquent
@return FormBuilder
@throws Exception
gets form instance