Total Complexity | 1 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class PostView extends Model |
||
21 | { |
||
22 | protected $table = 'post_views'; |
||
23 | |||
24 | protected $fillable = [ |
||
25 | 'post_id', |
||
26 | 'ip_address', |
||
27 | 'time_check', |
||
28 | ]; |
||
29 | |||
30 | protected $casts = [ |
||
31 | 'time_check' => 'datetime', |
||
32 | ]; |
||
33 | |||
34 | /** |
||
35 | * Get the post associated with this view. |
||
36 | * |
||
37 | * @return BelongsTo<\CSlant\Blog\Core\Models\Post, \CSlant\Blog\Api\Models\PostView> |
||
38 | * @phpstan-ignore generics.notSubtype |
||
39 | */ |
||
40 | public function post(): BelongsTo |
||
46 |