Files
construprogress/app/Notifications/IssueCommentedNotification.php
T
Javier Braña 90630379fb chore: cleanup dead code + format with Pint
- Remove unused FeaturesController (empty stubs, no routes)
- Remove ConvertSpatialFile CLI command (unused; service used in LayerManager)
- Remove MigrateGeojsonToFeatures CLI command (one-shot migration, not referenced)
- Remove .claude/worktrees/ (11 old agent worktrees from June)
- Apply Laravel Pint formatting across 219 files (style only, no functional changes)

Tests: 101 passing (319 assertions)
API routes: unchanged (8 routes intact)
2026-08-28 13:04:28 +02:00

34 lines
850 B
PHP

<?php
namespace App\Notifications;
use App\Models\IssueComment;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Support\Str;
class IssueCommentedNotification extends Notification
{
use Queueable;
public function __construct(public IssueComment $comment) {}
public function via($notifiable): array
{
return ['database'];
}
public function toArray($notifiable): array
{
$issue = $this->comment->issue;
return [
'type' => 'issue_commented',
'issue_id' => $this->comment->issue_id,
'project_id' => $issue?->project_id,
'author' => $this->comment->user?->name,
'message' => "{$this->comment->user?->name} comentó en '{$issue?->title}': ".Str::limit($this->comment->body, 60),
];
}
}