summaryrefslogtreecommitdiff
path: root/app/Category.php
blob: 7f0cdb25a5c8ee2ab1dbca3320c6ef6d4079a1db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Category extends Model
{
	protected $table = "category";
	protected $fillable = [
		'id',
		'name'
	];

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