This commit is contained in:
2022-11-01 11:07:41 +08:00
commit c23de98690
131 changed files with 14088 additions and 0 deletions

22
app/Models/Comment.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
class Comment extends Model
{
use SoftDeletes;
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function parent(): BelongsTo
{
return $this->belongsTo(__CLASS__, 'parent_id');
}
}