jaghoub/izitools
Composer 安装命令:
composer require jaghoub/izitools
包简介
professional notifications and modals from izimodal + izitosat for Laravel
README 文档
README
Using Composer
composer require jaghoub/izitools
Add the service provider to config/app.php
jaghoub\izitools\izitoolsServiceProvider::class,
Optionally include the Facade in config/app.php if you'd like.
'izitools' => jaghoub\izitools\Facades\izitools::class,
Usage
Basic
From your application, call the izime method with a options and type.
include styles
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.1.1/css/iziToast.min.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/izimodal/1.4.2/css/iziModal.css" />
include javascript
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.1.1/js/iziToast.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/izimodal/1.4.2/js/iziModal.min.js"></script>
if use Facade
izitools()->izime('tosat', [ 'title'=> 'Welcome to laravel Website Test !', 'message'=>'is simply dummy text of the printing and typesetting industry. ', 'color'=>'green', 'position'=>'center' ]); --- or --- izitools()->izime('modal', [ 'title'=> 'Welcome to laravel Website Test !', 'iframe'=>true, 'iframeHeight'=>800, 'iframeURL'=>'http://izimodal.dolce.ninja' ]);
without Facade
izitools::izime('tosat', [ 'title'=> 'Welcome to laravel Website Test !', 'message'=>'is simply dummy text of the printing and typesetting industry. ', 'color'=>'green', 'position'=>'center' ]); --- or --- izitools::izime('modal', [ 'title'=> 'Welcome to laravel Website Test !', 'iframe'=>true, 'iframeHeight'=>800, 'iframeURL'=>'http://izimodal.dolce.ninja' ]);
Within a view, you can now check if a flash message exists and output it.
@if (izitools::ready()) {{ izitools::type() }} @endif
Options
You can pass additional options to the izime method, which are then easily accessible within your view.
izitools::izime('modal', [ 'title'=> 'Welcome to laravel Website Test !', etc ... ]);
Then, in your view without Facade.
@if (izitools::ready()) <script> $(document).ready(function(){ @if (izitools::type() =='tosat') iziToast.show({ {!! izitools::options() !!} }); @elseif(izitools::type() =='modal') $("#modal").iziModal({ {!! izitools::options() !!} }); $('#modal').iziModal('open'); @else iziToast.show({ title: 'this option not Available', message: 'this packages include only modal and tosat type please select one of them while sending data', color:'red' }); @endif }); </script> @endif
with using Facade
@if (izitools()->ready()) <script> $(document).ready(function(){ @if (izitools()->type() =='tosat') iziToast.show({ {!! izitools::options() !!} }); @elseif(izitools()->type() =='modal') $("#modal").iziModal({ {!! izitools()->options() !!} }); $('#modal').iziModal('open'); @else iziToast.show({ title: 'this option not Available', message: 'this packages include only modal and tosat type please select one of them while sending data', color:'red' }); @endif }); </script> @endif
its not suggested to use {!! !!} method on real app it will allow the attack of XSS unless you are sure about data will be pushed .
'better user the method izitools::option("option_name")'
Built With
The above example uses izimodal,izitosat but the flexibily of izitools means you can easily use it with any JavaScript alert solution.
Issues and contribution
Just submit an issue or pull request through GitHub. Thanks!
jaghoub/izitools 适用场景与选型建议
jaghoub/izitools 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 73 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 06 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「notifications」 「laravel」 「modals」 「tosat」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jaghoub/izitools 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jaghoub/izitools 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jaghoub/izitools 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel Nova package that adds a notification feed in your Nova app.
To manage your crud in laravel 5.1
Laravel & Vue.js FullStack Components for Rapid Application Development
Modals
Simple modals from an HTML element.
Captures outgoing SMS notifications
统计信息
- 总下载量: 73
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-24