1 | <?php |
||
11 | class Article extends Model |
||
12 | { |
||
13 | use Countable; |
||
14 | |||
15 | /** |
||
16 | * The "booting" method of the model. |
||
17 | * |
||
18 | * @return void |
||
19 | */ |
||
20 | protected static function boot() |
||
36 | |||
37 | /** |
||
38 | * Return the count cache configuration. |
||
39 | * |
||
40 | * @return array |
||
41 | */ |
||
42 | public function countCaches(): array |
||
49 | |||
50 | /** |
||
51 | * Get the category that owns the article. |
||
52 | * |
||
53 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
54 | */ |
||
55 | public function category() |
||
59 | |||
60 | /** |
||
61 | * Get the user that owns the article. |
||
62 | * |
||
63 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
64 | */ |
||
65 | public function user() |
||
69 | |||
70 | /** |
||
71 | * Get the comments for the article. |
||
72 | * |
||
73 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
74 | */ |
||
75 | public function comments() |
||
79 | } |
||
80 |