$posts * @property-read int|null $posts_count * @property-read \App\Models\User|null $user * @method static \Illuminate\Database\Eloquent\Builder|Thread newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Thread newQuery() * @method static \Illuminate\Database\Eloquent\Builder|Thread query() * @method static \Illuminate\Database\Eloquent\Builder|Thread whereBody($value) * @method static \Illuminate\Database\Eloquent\Builder|Thread whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Thread whereForumId($value) * @method static \Illuminate\Database\Eloquent\Builder|Thread whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|Thread whereTitle($value) * @method static \Illuminate\Database\Eloquent\Builder|Thread whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Thread whereUserId($value) * @mixin \Eloquent */ class Thread extends Model { protected $fillable = [ 'forum_id', 'user_id', 'title', 'body', ]; public function forum(): BelongsTo { return $this->belongsTo(Forum::class); } public function user(): BelongsTo { return $this->belongsTo(User::class); } public function posts(): HasMany { return $this->hasMany(Post::class); } }