承接 sun/laravel-flash 相关项目开发

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

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

sun/laravel-flash

最新稳定版本:v1.4

Composer 安装命令:

composer require sun/laravel-flash

包简介

Sun Flash helps you to add flash messages to your Laravel application.

README 文档

README

Total Downloads Latest Stable Version Latest Unstable Version License

Sun Flash message helps you to add flash messages to your Laravel application.

Installation Process

In order to install Sun Flash, just add

 "sun/laravel-flash": "1.*"

to your composer.json. Then run composer install or composer update.

Then in your config/app.php add

 Sun\Flash\FlashServiceProvider::class,

in the providers array and

 'Flash' => Sun\Flash\FlashFacade::class,

to the aliases array.

and also added Sun Flash message view where you want to show flash message.

 @include('sun::flash')

To Publish Sun Flash View

 php artisan vendor:publish

In the Sun Flash message view I used Bootstrap css framework for flash message styling. You also need to add bootstrap to your project.

Bootstrap css, js and jQuery cdn
 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
 <script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

Add this line at the bottom of your page

<script>
    $(function () {
        $('.flash-modal').modal();

    })
</script>

All Methods

To show success message
Flash::success('Hello');
To show error message
Flash::error('Whoops! There were some problems with your input.');
To show info message
Flash::info('your message');
To show warning message
Flash::warning('your message');
To show confirm message
Flash::confirm('Message Title', 'Your Message');
To show bootstrap modal popup message
Flash::overlay(
                 'Message Title',
                 'Your Message',
                 true,
                 'Allow Button Text',
                 'Allow Button Type',
                 'Dismiss Button Text',
                 'Dismiss Button Type
                 );

Defalut value for --

 Submit Button = false
 Allow Button Text = Save
 Allow Button Type = success
 Dismiss Button Text = Close
 Dismiss Button Type = default

Screenshots

Flash Message Overlay:

Overlay view

Flash Message Success:

Overlay view

Flash Message Error:

Overlay view

License

This package is licensed under the MIT License

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固