Bez popisu

School.php 422B

12345678910111213141516171819202122232425
  1. <?php
  2. class School extends Eloquent
  3. {
  4. public function programs()
  5. {
  6. return $this->hasMany('Program')->orderBy('name', 'asc');
  7. }
  8. public function coordinators()
  9. {
  10. return $this->hasMany('User');
  11. }
  12. public function courses()
  13. {
  14. return $this->hasManyThrough('Course', 'Program')->orderBy('name', 'asc');
  15. }
  16. public function templates()
  17. {
  18. return $this->hasMany('Template')->orderBy('name', 'asc');
  19. }
  20. }