承接 ghanem/notify 相关项目开发

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

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

ghanem/notify

Composer 安装命令:

composer require ghanem/notify

包简介

Laravel 5 Flash Notifications with icons and animations and with a timeout

README 文档

README

Notify alert boxes to the browser and give it a timeout to fly out. Works great to notify the user after a successfull action (CRUD). Flash the information from Laravel or create multiple from javascript.

Installation

First, pull in the package through Composer.

"require": {
	"ghanem/notify": "1.*"
}

OR

composer require ghanem/notify

Include the service provider within config\app.php.

'providers' => [
	Ghanem\Notify\NotifyServiceProvider::class,
];

Add a facade alias or use the globel helper function notify().

'aliases' => [
	'Notify' => Ghanem\Notify\Facades\Notify::class,
];

Usage

Within any view file (preferable your master layout).

@include('notify::notify')

Within any Controller.

public function index()
{
    // helper function - default to the 'info'
    notify('Content');

    // return object first
    notify()->info('Content');

    // via the facade
    Notify::info('Content');
    
    return view('home');
}

The different 'levels' are:

  • notify()->info('Content');
  • notify()->success('Content');
  • notify()->warning('Content');
  • notify()->error('Content');

The different arguments:

  • notify()->info('contnent', 10000, false); // without Cansel button

If you need to modify the view partial, you can run:

php artisan vendor:publish --provider="Ghanem\Notify\NotifyServiceProvider" --tag=view

The view partial can be found here resources\views\vendor\notify\notify.blade.

You need to publish the assets.

php artisan vendor:publish --provider="Ghanem\Notify\NotifyServiceProvider" --tag=public

Find the files here public\vendor\notify\. Move the mp3s to public\sounds\. If you use Laravel Elixir, move the css and js to your resource\assets and include them in your gulpfile.js, otherwise link to the individual files in your html header.

Note

Please keep in mind this is for my personal workflow and might not fit your need. I developed this to help speed up my day to day workflow. Please let me know about any issues or if you have any suggestions.

My other Packages

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: CSS

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固