我应该把什么作为Laravel 4 eloquent模型类中docblock的返回值

1 phpdoc laravel laravel-4

我有以下基本类设置:

class Document extends Eloquent {

    /**
     * [types description]
     * @return [type] [description]
     */
    public function types() {
        return $this->belongsToMany('Type');
    }

}
Run Code Online (Sandbox Code Playgroud)

什么值适合放入返回类型doc块?执行返回方法的var转储指向对象\ Illuminate\Database\Eloquent\Relations\BelongsToMany

在这种情况下,这是正确的吗?(我不确定为什么会这样?)

谢谢

Ant*_*iro 5

Laravel使用的是:

@return \Illuminate\Database\Eloquent\Relations\BelongsToMany
Run Code Online (Sandbox Code Playgroud)

看看文件

vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php
Run Code Online (Sandbox Code Playgroud)