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.
Headers
You can add a header to the card using the heading() method:
Alert::make() ->heading('My Heading') ->message('some longer message here') ->success(),
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.
统计信息
- 总下载量: 134
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-12

