[ 'first_name' => 10, 'surnames' => 10, 'email' => 2, ], ]; public function program() { return $this->belongsTo('Program'); } public function school() { return $this->belongsTo('School'); } public function courses() { return $this->hasMany('Course')->whereIn('semester_id', Session::get('semesters_ids'))->orderBy('code')->orderBy('number')->orderBy('section')->orderBy('semester_id'); } public function rubrics() { return $this->hasMany('Rubric')->orderBy('name'); } // return the programs the user is a pcoord of public function programs() { return $this->belongsToMany('Program')->select('programs.id', 'programs.name', 'programs.school_id', 'programs.is_graduate'); } }