added attchments
This commit is contained in:
@@ -14,6 +14,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @property string $body
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Attachment> $attachments
|
||||
* @property-read \App\Models\Thread $thread
|
||||
* @property-read \App\Models\User|null $user
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Post newModelQuery()
|
||||
@@ -51,4 +52,9 @@ class Post extends Model
|
||||
{
|
||||
return $this->hasMany(PostThank::class);
|
||||
}
|
||||
|
||||
public function attachments(): HasMany
|
||||
{
|
||||
return $this->hasMany(Attachment::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user