1 | <?php namespace jlourenco\blog\Models; |
||
6 | class BlogCategory extends Model |
||
7 | { |
||
8 | |||
9 | /** |
||
10 | * To allow user actions identity (Created_by, Updated_by, Deleted_by) |
||
11 | */ |
||
12 | use Creation; |
||
13 | |||
14 | /** |
||
15 | * {@inheritDoc} |
||
16 | */ |
||
17 | protected $table = 'BlogCategory'; |
||
18 | |||
19 | /** |
||
20 | * {@inheritDoc} |
||
21 | */ |
||
22 | protected $fillable = [ |
||
23 | 'name', |
||
24 | 'description' |
||
25 | ]; |
||
26 | |||
27 | /** |
||
28 | * The Blog post model name. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | protected static $postsModel = 'jlourenco\blog\Models\BlogPost'; |
||
33 | |||
34 | /** |
||
35 | * Returns the post model. |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | public static function getPostsModel() |
||
43 | |||
44 | /** |
||
45 | * Sets the post model. |
||
46 | * |
||
47 | * @param string $postsModel |
||
48 | * @return void |
||
49 | */ |
||
50 | public static function setPostsModel($postsModel) |
||
54 | |||
55 | public function posts() |
||
59 | |||
60 | } |
||
61 |