记录模型使用情况的正确方法是什么


What is the right way to document usage of models?

记录在Model B中访问的Model A的使用情况的正确方法是什么?在这种情况下,我想记录Excel的用法。

class Preview extends Eloquent {
    /**
     * Push file Data to Session
     *
     * @ ...
     */
    public static function push() {
        Session::put('data', Excel::get(self::file));
    }
}

您可以使用@see注释指向另一个类:

class Preview extends Eloquent {
    /**
     * Push file Data to Session
     *
     * @see Excel::get()
     * @see Session
     * @see http://php.net/manual/en/features.sessions.php
     */
    public static function push() {
        Session::put('data', Excel::get(self::file));
    }
}

当生成html文档时,它应该创建一个锚标记,链接到Excel类的get方法Session类的文档。和php.net手动