31 lines
510 B
PHP
31 lines
510 B
PHP
|
|
<?php namespace RainLab\Blog\Models;
|
||
|
|
|
||
|
|
use Model;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Model
|
||
|
|
*/
|
||
|
|
class CategoryPivot extends Model
|
||
|
|
{
|
||
|
|
use \October\Rain\Database\Traits\Validation;
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @var string The database table used by the model.
|
||
|
|
*/
|
||
|
|
public $table = 'rainlab_blog_category_pivot';
|
||
|
|
|
||
|
|
|
||
|
|
public $belongsTo = [
|
||
|
|
'category' => [
|
||
|
|
'RainLab\Blog\Models\Category',
|
||
|
|
'key' => 'category_id'
|
||
|
|
],
|
||
|
|
];
|
||
|
|
/**
|
||
|
|
* @var array Validation rules
|
||
|
|
*/
|
||
|
|
public $rules = [
|
||
|
|
];
|
||
|
|
}
|