gtmassey/alert-card 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gtmassey/alert-card

最新稳定版本:v1.0

Composer 安装命令:

composer require gtmassey/alert-card

包简介

A Laravel Nova card.

README 文档

README

A simple alert card to display persistent notices and messages on Nova resources or dashboards. Styled for my personal preferences.

Installation

composer require gtmassey/alert-card

Usage

use Gtmassey\AlertCard\Alert;

//...

public function cards()
{
    return [
        Alert::make()
            ->message('My Message!');
    ];
}

Colors

There are four alert styles - primary/info, success, warning and danger.

Alert::make()
    ->message('some message here')
    ->info(),  //this is the default style, applies when no style is declared
    
Alert::make()
    ->message('some message here')
    ->success(),
    
Alert::make()
    ->message('some message here')
    ->warning(),
    
Alert::make()
    ->message('some message here')
    ->danger(),

The info style uses whatever color you have defined as your primary color in Nova.

Heading screenshot

Headers

You can add a header to the card using the heading() method:

Alert::make()
    ->heading('My Heading')
    ->message('some longer message here')
    ->success(),

Heading screenshot

Icons

You can add an icon to the card using the icon() method:

Alert::make()
    ->heading('My Heading')
    ->message('some longer message here')
    ->success()
    ->icon('check-circle'),

Just pass in the name of the corresponding herocion icon.

The icon color will match the color selected for the card.

Heading screenshot

统计信息

  • 总下载量: 134
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-12