original_string: public function build($name, Collection $fields = null)
      {
          $path = $this->getClassFilePath($name);
          $tableName = source_table_name($name);
  
          $contents = view('_hierarchy::entities.model', [
              'tableName'        => $tableName,
              'name'             => $this->getClassName($name),
              'fields'           => $this->makeFields($fields),
              'searchableFields' => $this->makeSearchableFields($fields, $tableName),
              'mutatables'       => $this->makeMutatableFields($fields)
          ])->render();
  
          $this->write($path, $contents);
      }
code: public function build($name, Collection $fields = null)
      {
          $path = $this->getClassFilePath($name);
          $tableName = source_table_name($name);
  
          $contents = view('_hierarchy::entities.model', [
              'tableName'        => $tableName,
              'name'             => $this->getClassName($name),
              'fields'           => $this->makeFields($fields),
              'searchableFields' => $this->makeSearchableFields($fields, $tableName),
              'mutatables'       => $this->makeMutatableFields($fields)
          ])->render();
  
          $this->write($path, $contents);
      }
code_tokens: public function build ( $ name , Collection $ fields = null ) { $ path = $ this -> getClassFilePath ( $ name ) ; $ tableName = source_table_name ( $ name ) ; $ contents = view ( '_hierarchy::entities.model' , [ 'tableName' => $ tableName , 'name' => $ this -> getClassName ( $ name ) , 'fields' => $ this -> makeFields ( $ fields ) , 'searchableFields' => $ this -> makeSearchableFields ( $ fields , $ tableName ) , 'mutatables' => $ this -> makeMutatableFields ( $ fields ) ] ) -> render ( ) ; $ this -> write ( $ path , $ contents ) ; }
docstring: Builds a source model
  
  @param string $name
  @param Collection $fields
docstring_tokens: Builds a source model