1 | <?php |
||
12 | class Article extends Model |
||
13 | { |
||
14 | use Countable, |
||
15 | Sluggable; |
||
16 | |||
17 | /** |
||
18 | * The "booting" method of the model. |
||
19 | * |
||
20 | * @return void |
||
21 | */ |
||
22 | protected static function boot() |
||
38 | |||
39 | /** |
||
40 | * Return the field to slug. |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | public function slugStrategy(): string |
||
48 | |||
49 | /** |
||
50 | * Return the count cache configuration. |
||
51 | * |
||
52 | * @return array |
||
53 | */ |
||
54 | public function countCaches(): array |
||
61 | |||
62 | /** |
||
63 | * Get the category that owns the article. |
||
64 | * |
||
65 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
66 | */ |
||
67 | public function category() |
||
71 | |||
72 | /** |
||
73 | * Get the user that owns the article. |
||
74 | * |
||
75 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
76 | */ |
||
77 | public function user() |
||
81 | |||
82 | /** |
||
83 | * Get the comments for the article. |
||
84 | * |
||
85 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
86 | */ |
||
87 | public function comments() |
||
91 | } |
||
92 |