kapouet/laravel-notyf
Composer 安装命令:
composer require kapouet/laravel-notyf
包简介
Add Notyf support in your Laravel app
README 文档
README
Add Notyf support in your Laravel app.
Installation
You can install the package via composer
composer require kapouet/laravel-notyf
You can publish the config file with:
php artisan vendor:publish --provider="Kapouet\Notyf\NotyfServiceProvider" --tag="kapouet:config"
The config file is structured like Notyf, but in PHP, see https://github.com/caroso1222/notyf#api
Usage
Import assets
<!-- For CSS --> <x-notyf::styles/> <!-- For JS --> <!-- Import this script after Livewire if you use it --> <xnotyf::scripts/>
Send toast with PHP
Notyf::success('I\'m a success message'); Notyf::error('I\'m an error message'); // If you are added custom types in config file // https://github.com/caroso1222/notyf#inotyfnotificationoptions Notyf::message('custom', 'I\'m a custom message');
Send toast with Livewire
use Kapouet\Notyf\Traits\Livewire\WithNotyf; use Livewire\Component; class MyComponent extends Component { use WithNotyf; public function render(): string { return <<<'blade' <div> <button wire:click="toast">Toast me</button> </div> blade; } public function toast(): void { $this->notyfSuccess('I\'m a success message'); $this->notyfError('I\'m an error message'); // If you are added custom types in config file // https://github.com/caroso1222/notyf#inotyfnotificationoptions $this->notyfMessage('custom', 'I\'m a custom message'); } }
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
kapouet/laravel-notyf 适用场景与选型建议
kapouet/laravel-notyf 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.02k 次下载、GitHub Stars 达 7, 最近一次更新时间为 2021 年 03 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「notification」 「toast」 「notyf」 「kapouet」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kapouet/laravel-notyf 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kapouet/laravel-notyf 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kapouet/laravel-notyf 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Integrate Notyf's minimalist flash notifications with Laravel via PHPFlasher. Enhance your Laravel apps with sleek, concise user notifications.
Adopt Notyf's simple flash notifications in Symfony projects with PHPFlasher. Streamline user notifications in Symfony with Notyf's elegant simplicity.
PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.
PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.
This package makes it easy to send notifications via AfricasTalking with Laravel
Apple Push Notification & Feedback Provider
统计信息
- 总下载量: 1.02k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-03-06