20Tauri / DoxyDoxygen

The last word in code documentation generation
140 stars 5 forks source link

How can i add defaults for php laravel relationships ? #131

Closed wecodelaravel closed 5 years ago

wecodelaravel commented 5 years ago

I need to know how to add new doc block types for php's laravel. I need it to generate correctly for relationship fields. Here is an example:

Here is what it generates now

    /**
     * { function_description }
     *
     * @return     <type>  ( description_of_the_return_value )
     */
    public function model()
    {
        return $this->hasOne(Model::class, 'model_id');
    }

Into this


/**
 * Relationship with the Model model.
 * 
 * @return    Illuminate\Database\Eloquent\Relations\HasOne
 */
public function model()
{
    return $this->hasOne(Model::class);
}

Any guidance would be great. Thank you

20Tauri commented 5 years ago

I don't undestand why the function body have change in your example

The settings autofill_rules may probably help to fill the "function_description" field. The same setting may also be used for the "description_of_the_return_value".

Is sound really specific. But do not hesitate to report your experience here for the other PHP developper

wecodelaravel commented 5 years ago

@20Tauri Thank you for your quick response, I have not spent alot of time in sublimetext plugins can you maybe show me how i can do that in the autofill_rules and function description so i have a general idea of how and where to start please.

thank you.

20Tauri commented 5 years ago

Open the palette ctrl+shift+p, then chose Preferences: DoxDoxygen settings. You are now in the plugin settings. The default settings are on the left side and the documentation may be found on DoxyDoxygen manual. Good learning !