This commit is contained in:
yuriko 🦊 2025-05-24 17:01:54 -04:00
parent afc1fb10bc
commit 8004c8d69e
Signed by: jaiden
SSH key fingerprint: SHA256:f8tvveBoXBrKZIQDWLLcpQrKbATUCGg98x2N4YzkDM8
12 changed files with 320 additions and 5 deletions

24
app/Models/Comment.php Normal file
View file

@ -0,0 +1,24 @@
<?php
namespace App\Models;
use MongoDB\Laravel\Eloquent\Model;
use MongoDB\Laravel\Eloquent\SoftDeletes;
use MongoDB\Laravel\Relations\BelongsTo;
class Comment extends Model
{
use SoftDeletes;
protected $fillable = [ 'message' ];
public function post(): BelongsTo
{
return $this->belongsTo(Post::class);
}
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}