Add support for models that override Eloquent's newCollection() with a
custom collection type. Do this by executing the relationship on the
model then executing that relationship's newCollection() method to see
what type of colletion class is returned.
Remove the now-unused
Barryvdh\LaravelIdeHelper\Console\ModelsCommand::getClassName() method.
If relation has other methods, generating doc is fail.
E.g.
$this->belongsToMany('App\User')->withTimestamps();
generate this:
@property-read \Illuminate\Database\Eloquent\Collection|\App\User')->withTimestamps([] $drinks
When define a class(table) , we will add some comment information to the property (field), the comment information was useful for coder who has bad memory.so ,I think we'd better show the comment at the end of * @property line.
I'm a Chinese, most of my team was Chinese too, the comment information was written by Chinese, so , it's helpful!
-------------------------
当我们定义一个类(表)的时候,我们会给对象(字段)加上一些注释信息,这些注释信息对记忆力不好的程序员很有用,所以我认为我们可以在属性行的尾部加入注释信息
我是个中国人,我团队中的大部分人也是中国人,这些注释信息是中文写的,对他们很有帮助。
trying to generate doc for a model with dependencies in constructor will fail with `new $name` .
Now it works using App:make($name).
Laravel IOC resolves the dependencies.
According to PSR-2, "there MUST NOT be trailing whitespace at the end of non-blank lines" (http://www.php-fig.org/psr/psr-2/). My IDE is checking for this, and I always have to remove the spaces manually... ;-)