'json' ]; /** * The attributes excluded from the model's JSON form. * * @var array */ protected $hidden = []; public function models() { return $this->belongsToMany(Grade::class, PaperModel::class, 'paper_id', 'model_id')->select(['mentor_grades.id', 'mentor_grades.name']); } // public function banks() // { // return $this->belongsToMany(Bank::class, PaperBank::class); // } public function records() { return $this->hasMany(Record::class, 'paper_id'); } }