1 | <?php |
||
15 | class ForumCategory extends AbstractModel |
||
16 | { |
||
17 | public $table = 'forum_categories'; |
||
18 | |||
19 | public $fillable = ['name']; |
||
20 | |||
21 | /** |
||
22 | * Eloquent Relation. |
||
23 | * @return mixed |
||
24 | */ |
||
25 | public function forums() |
||
29 | |||
30 | /** |
||
31 | * Is model data valid. |
||
32 | * @param array|object $data The data to validate. |
||
33 | * @return boolean |
||
34 | */ |
||
35 | public static function valid($data) |
||
47 | |||
48 | /** |
||
49 | * Returns the category as an html option. |
||
50 | * @return string |
||
51 | */ |
||
52 | public function toOption() |
||
56 | |||
57 | /** |
||
58 | * Return the category name as a string. |
||
59 | * @return string |
||
60 | */ |
||
61 | public function __toString() |
||
65 | } |
||
66 |