original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: gets form instance
  
  @param Model $eloquent
  @return FormBuilder
  @throws Exception
docstring_tokens: gets form instance