定制 augstudios/alerts 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

augstudios/alerts

Composer 安装命令:

composer require augstudios/alerts

包简介

Package for sending alerts with Laravel 5.

README 文档

README

Build Status Total Downloads License

About

This package is in very early initial development, things are very likely going change before a stable release is tagged.

Alerts is a Laravel 5 package that allows you to easily flash alerts to the Session to be consumed on the next request.

Installation

First, install the package and it's dependencies with composer by running within your application's root folder:

composer require augstudios/alerts

Then, you will need to add the the Alerts service provider and facade to your application's configuration in /app/config/app.php.

'providers' => [
    ...
    'Augstudios\Alerts\AlertsServiceProvider'
];
...

'aliases' => [
	...
    'Alerts' => 'Augstudios\Alerts\AlertsFacade'
];

Usage

To flash messages, to be displayed on the next request, you can use the Alerts::flash(message, type) method:

public function save()
{
    Alerts::flash('Welcome Aboard!', 'info');

    return Redirect::home();
}

There also exists some shortcut methods for each alert type:

Alerts::flashInfo('Info message');
Alerts::flashWarning('Warning message');
Alerts::flashDanger('Danger message');
Alerts::flashSuccess('Success message');

To get the previously flashed alerts, use the Alerts::all() method:

foreach(Alerts::all() as $alert){
	// this is likely to change so Alert is an object
	// $alert['message'] has message
	// $alert['type'] has type
	// $alert['dismissiable']
}    

If you only want one type of alert, you can use the Alerts::ofType(type) method:

Alerts::ofType('info');
Alerts::ofType('warning');
Alerts::ofType('danger');
Alerts::ofType('success');

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固