Laravel 模型关联 hasManyThrough 反向关联怎么配置

现在有 3 个数据表

schools:
    id
    name

grades:
    id
    name
    school_id

students:
    id
    name
    grade_id

我在 School 模型定义了一个远程一对多的关系获取学校的学生

public function students()
    {
        return $this->hasManyThrough(
            Student::class,
            Grade::class,
                'school_id',
                'grade_id',
                'id',
                'id'
        );
    }

现在有个需求想在 Student 直接获取 School,
通过在 Student belongsTo(Grade::class)
在 Grade belongsTo(School::class)
这样 $student->grade->school 获取没有问题
我现在想直接 $student->school 有什么优雅的办法
是否类似这样去获取?

public fuction school()
{
  return $this->grade()->school(); 
}
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。