cleaning day

This commit is contained in:
ludo
2024-02-22 21:28:33 +01:00
parent 64a218afc2
commit fb6da523fa
111 changed files with 198 additions and 2456 deletions

View File

@@ -5,6 +5,8 @@ namespace App\Models\Core;
use App\Traits\Model\HasComments;
use Exception;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphTo;
class Comment extends Model
{
@@ -21,12 +23,12 @@ class Comment extends Model
return $query->where('is_approved', true);
}
public function commentable()
public function commentable(): MorphTo
{
return $this->morphTo();
}
public function commentator()
public function commentator(): BelongsTo
{
return $this->belongsTo($this->getAuthModelName(), 'user_id');
}