<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Article extends Model
{
	protected $table = "view_article";

	protected $fillable = [
	];

	public function getDiscussions() {
		#return $this->hasMany('App\Discussion', 'article_id', 'id');
		return $this->hasMany('App\Discussion');
	}

	public function getCategories() {
		return $this->belongsToMany('App\Category', 'article_category');
	}
}

