appslabke/lara-izitoast
Composer 安装命令:
composer require appslabke/lara-izitoast
包简介
Simplified wrapper for izitoast javascript notification library
README 文档
README
This is a laravel notification wrapper build with http://izitoast.marcelodolce.com javascript library.
How to use this package
Config
-
Change the configuration on lara-izitoast.php config dir.
-
Get the package via composer
composer require appslabke/lara-izitoast
- if you are not using Laravel 5.5 or higher add the service provider in your app.php under providers, in config dir.
'providers' => [ LaraIzitoast\LaraIzitoastServiceProvider::class, ]
If you are using Laravel 5.5 and above, the package will be auto-discovered by laravel
- Publish Lara-Izitoast package
php artisan vendor:publish --provider="LaraIzitoast\LaraIzitoastServiceProvider"
-
http://izitoast.marcelodolza.com CSS and JS files will be published in your public dir.
-
This will also create a config file. You can change the notification size from config
-
On your layout blade add the files
<head>
.....
<link href="{{ asset('css/iziToast.css') }}" rel="stylesheet">
.....
</head>
<body>
.....
<script src="{{ asset('js/iziToast.js') }}"></script>
.....
<body/>
- Include the package view file in Layout blade below the iziToast js
@include('vendor.lara-izitoast.toast')
- Remember to add also font-awesome or Icomoon https://fontawesome.com/?from=io / https://icomoon.io/ if you are going to use icons
Let's make a toast
- Quick way to make a toast (notification)
notify("Quick notification");
or
notify("Let's make a toast","Toast","info","topRight");
- Notification Methods
notify()->success("Message","Title","position", "icon);
notify()->success("Success notification test","Success","topRight");
notify()->error("Error notification test","Error","topLeft");
notify()->warning("Warning notification test","Warning","bottomLeft");
notify()->info("Info notification test","Info","bottomRight");
return view('welcome');
- And that's it.
Contributing & License
Lara-Izitoast is distributed under the MIT license.
About Apps:Lab
appslabke/lara-izitoast 适用场景与选型建议
appslabke/lara-izitoast 是一款 基于 CSS 开发的 Composer 扩展包,目前已累计 39.85k 次下载、GitHub Stars 达 40, 最近一次更新时间为 2019 年 01 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 appslabke/lara-izitoast 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 appslabke/lara-izitoast 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 39.85k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 41
- 点击次数: 16
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-01-18
