一键导入
notify-alert
Use Laragear Alerts as a channel for Laravel Notifications.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use Laragear Alerts as a channel for Laravel Notifications.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | notify-alert |
| description | Use Laragear Alerts as a channel for Laravel Notifications. |
Use this skill when you want Laravel Notifications to be delivered as alerts in your application's frontend.
Add Laragear\Alerts\AlertChannel::class to the via() method of your notification.
use Laragear\Alerts\AlertChannel;
public function via(object $notifiable): array
{
return [AlertChannel::class, 'mail'];
}
Implement the toAlert() method to return an Alert instance. It's recommended to use make() instead of push() here.
use App\Alerts\MyAlert;
use Laragear\Alerts\Alert;
public function toAlert(object $notifiable): Alert
{
return MyAlert::make()
->set('type', 'success')
->set('body', 'Your report is ready!');
}
The AlertChannel only works during a web request. If the notification is sent via a background queue that doesn't share the same session/request context, the alert will not be visible to the user unless they are using a persistent storage or broadcasting.