- Installed p7h/nas-file-manager package via private VCS repo - Published config/nas-file-manager.php with super_admin middleware restriction - Added NAS env vars to .env.example - Created admin/nas-storage page with connection info panel and file browser widget - Added NAS Storage link to admin sidebar (super_admin only) - Added SuperAdminController@nasStorage method and admin.nas-storage route - Includes all accumulated branch changes: profile wall, 2FA, audit logs, settings panel, country/phone/timezone components, posts, slideshow, playlist shares, video downloads/shares, comment likes, notifications, social links, and more Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use App\Models\Comment;
|
|
use App\Models\User;
|
|
use App\Models\Video;
|
|
use Illuminate\Notifications\Notification;
|
|
use Illuminate\Support\Str;
|
|
|
|
class NewCommentNotification extends Notification
|
|
{
|
|
public function __construct(
|
|
public Video $video,
|
|
public Comment $comment,
|
|
public User $commenter
|
|
) {}
|
|
|
|
public function via(object $notifiable): array
|
|
{
|
|
return ['database'];
|
|
}
|
|
|
|
public function toArray(object $notifiable): array
|
|
{
|
|
return [
|
|
'type' => 'new_comment',
|
|
'video_id' => $this->video->id,
|
|
'video_route_key' => $this->video->getRouteKey(),
|
|
'video_title' => $this->video->title,
|
|
'video_thumbnail' => $this->video->thumbnail,
|
|
'actor_id' => $this->commenter->id,
|
|
'actor_name' => $this->commenter->name,
|
|
'actor_avatar' => $this->commenter->avatar_url,
|
|
'comment_preview' => Str::limit($this->comment->body, 80),
|
|
];
|
|
}
|
|
}
|