🆙 Forget data back 🆙

This commit is contained in:
Remco
2026-01-07 20:31:19 +01:00
parent acf2d7e661
commit 789b670f51
412 changed files with 66963 additions and 0 deletions
@@ -0,0 +1,28 @@
<?php
namespace App\Models\Articles;
use App\Models\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Support\Facades\Auth;
class WebsiteArticleComment extends Model
{
protected $guarded = ['id', 'created_at', 'updated_at'];
public function article(): BelongsTo
{
return $this->belongsTo(WebsiteArticle::class, 'article_id');
}
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function canBeDeleted(): bool
{
return $this->user_id === Auth::id() || hasPermission('delete_article_comments');
}
}