Total Complexity | 4 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class Category extends Model |
||
9 | { |
||
10 | public $fillable = [ |
||
11 | 'category_name', |
||
12 | 'slug', |
||
13 | 'category_description', |
||
14 | ]; |
||
15 | |||
16 | protected $table = 'blog_etc_categories'; |
||
17 | |||
18 | /** |
||
19 | * @return BelongsToMany |
||
20 | */ |
||
21 | public function posts(): BelongsToMany |
||
28 | ); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Returns the public facing URL of showing blog posts in this category. |
||
33 | * |
||
34 | * @return string |
||
35 | */ |
||
36 | public function url(): string |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @deprecated - use editUrl() |
||
43 | */ |
||
44 | public function edit_url(): string |
||
45 | { |
||
46 | return $this->editUrl(); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Returns the URL for an admin user to edit this category. |
||
51 | */ |
||
52 | public function editUrl(): string |
||
55 | } |
||
56 | } |
||
57 |