<?php

class School extends Eloquent
{
	public function programs()
	{
		return $this->hasMany('Program')->orderBy('name', 'asc');
	}

	public function coordinators()
	{
		return $this->hasMany('User');
	}

	public function courses()
	{
	    return $this->hasManyThrough('Course', 'Program')->orderBy('name', 'asc');
	}

	public function templates()
	{
	    return $this->hasMany('Template')->orderBy('name', 'asc');
	}

}
