public function build($name, Collection $fields = null)
    {
        $path = $this->getClassFilePath($name);

        $contents = view('_hierarchy::entities.form', [
            'name'   => $this->getClassName($name),
            'fields' => $fields ?: []
        ])->render();

        $this->write($path, $contents);
    }
public function build($name, Collection $fields = null)
    {
        $path = $this->getClassFilePath($name);

        $contents = view('_hierarchy::entities.form', [
            'name'   => $this->getClassName($name),
            'fields' => $fields ?: []
        ])->render();

        $this->write($path, $contents);
    }
public function build ( $ name , Collection $ fields = null ) { $ path = $ this -> getClassFilePath ( $ name ) ; $ contents = view ( '_hierarchy::entities.form' , [ 'name' => $ this -> getClassName ( $ name ) , 'fields' => $ fields ? : [ ] ] ) -> render ( ) ; $ this -> write ( $ path , $ contents ) ; }
Builds a source form

@param string $name
@param Collection|null $fields
Builds a source form