承接 eightynine/filament-page-alerts 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

eightynine/filament-page-alerts

最新稳定版本:v3.0.0

Composer 安装命令:

composer require eightynine/filament-page-alerts

包简介

Display more intrusive alerts in any filament page

README 文档

README

Display more aggressive alerts in any filament page

Latest Version on Packagist Total Downloads

🛠️ Be Part of the Journey

Hi, I'm Eighty Nine. I created page alerts plugin to solve real problems I faced as a developer. Your sponsorship will allow me to dedicate more time to enhancing these tools and helping more people. Become a sponsor and join me in making a positive impact on the developer community.

Introduction

This package shows alerts in any page, not just the dashboard, currently the alerts appear on top of the page.

Package screenshot

Installation

You can install the package via composer:

composer require eightynine/filament-page-alerts

You can publish the config file with:

php artisan vendor:publish --tag="filament-page-alerts-config"

This is the contents of the published config file:

use Filament\View\PanelsRenderHook;

return [

    /**
     * Render hook
     * 
     * The render hook to use for the alerts
     */
    "render-hook" => PanelsRenderHook::PAGE_START
];

Usage

Add the plugin to your panel service provider

    public function panel(Panel $panel): Panel
    {
        return $panel
            //...
            //...
            ->plugin(FilamentPageAlertsPlugin::make())
            ->spa();
    }

You can use the PageAlert class to send alerts to your page!

    return [
            Actions\CreateAction::make(),
            Actions\Action::make('show notification')
                ->action(function () {
                    PageAlert::make()
                        ->title('Saved successfully')
                        ->body('Yey.. Your changes have been saved: ' . now())
                        ->success()
                        ->send();
                    PageAlert::make()
                        ->title('Saved failure')
                        ->body('Ooops, Your changes have not been saved! ')
                        ->danger()
                        ->send();
                    PageAlert::make()
                        ->title('This requires your attention')
                        ->body('Hey there, this is important')
                        ->warning()
                        ->url('https://www.google.com', 'Google')
                        ->send();
                    PageAlert::make()
                        ->title('You need to check this out')
                        ->body('This looks like something worth your attention')
                        ->info()
                        ->send();
                }),
        ];

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固