sarfraznawaz2005/noty 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sarfraznawaz2005/noty

最新稳定版本:1.1.3

Composer 安装命令:

composer require sarfraznawaz2005/noty

包简介

Laravel package to incorporate noty flash notifications into laravel.

README 文档

README

Latest Version on Packagist Total Downloads

Laravel Noty

Laravel package to incorporate beautiful noty notifications into laravel as flash messages.

Tested with version 3.2.0 of noty.

Screenshot

Main Window

Requirements

  • PHP >= 5.6
  • Laravel 5
  • noty

Installation

Via Composer

$ composer require sarfraznawaz2005/noty

For Laravel < 5.5:

Add Service Provider to config/app.php in providers section

Sarfraznawaz2005\Noty\NotyServiceProvider::class,

Publish package's config file by running below command:

$ php artisan vendor:publish --provider="Sarfraznawaz2005\Noty\NotyServiceProvider"

It should publish config/noty.php config file.

Setup Noty

Before using this package, make sure you include noty library into your project either by using npm/yarn/etc or directly including its css and js files:

<head>    
    <link rel="stylesheet" href="/noty.css"/>
    <script type="text/javascript" src="/noty.js"></script>
</head>

and then add this in your view/layout file:

@include('noty::view')

Usage

Syntax:

noty($message, $type = '', array $options = [])

In your controllers, you can now do:

public function store()
{
    noty('Success Message', 'success');

    return redirect()->back();
}

Following are types of notifications you can send:

noty('Your Message'); // default (info)
noty('Your Message', 'success');
noty('Your Message', 'error');
noty('Your Message', 'warning');
noty('Your Message', 'alert');

With $options, you can also override noty config values for individual notifications example:

noty('My Notification', null, ['layout' => 'top', 'timeout' => 5000]);

Credits

License

Please see the license file for more information.

统计信息

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

GitHub 信息

  • Stars: 32
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固