File: D:/HostingSpaces/SBogers84/zuiderbos.nl/workbench/komma/kms/src/Komma/Kms/Schools/School.php
<?php
/**
* Short description for the file.
*
* @author Komma <info@komma.pro>
* @copyright (c) 2012-2015, Komma Mediadesign
*/
namespace Komma\Kms\Schools;
use Komma\Kms\Core\NestedSets\Nodes\EloquentNode as NestedSetNode;
class School extends NestedSetNode
{
protected $table = 'schools';
protected $fillable = ['id', 'name'];
public function calenderItems(){
return $this->belongsToMany('Komma\Kms\Calender\Models\Calender', 'calender_school', 'school_id', 'calender_id');
}
public function references(){
return $this->belongsToMany('Komma\Kms\References\Models\Reference', 'references_school', 'school_id', 'reference_id');
}
public function news(){
return $this->belongsToMany('Komma\Kms\Posts\Models\Post', 'posts_school', 'school_id', 'post_id');
}
public function newsletters(){
return $this->belongsToMany('Komma\Kms\Newsletters\Models\Newsletter', 'newsletters_school', 'school_id', 'newsletter_id');
}
public function photoAlbums(){
return $this->belongsToMany('Komma\Kms\PhotoAlbums\Models\PhotoAlbum', 'photo_albums_school', 'school_id', 'photo_album_id');
}
public function faq(){
return $this->belongsToMany('Komma\Kms\Faq\Models\Faq', 'faq_school', 'school_id', 'faq_id');
}
public function documents(){
return $this->belongsToMany('Komma\Kms\Documents\Models\Document', 'documents_school', 'school_id', 'document_id');
}
}