zoukankan      html  css  js  c++  java
  • laracasts/flash

    一个flash消息的插件

    1. composer require laracasts/flash
    2. configapp.php
      //provider
      'LaracastsFlashFlashServiceProvider'
      //aliases
      'Flash'  => 'LaracastsFlashFlash'
    3. 视图blade中调用
      @include('flash::message')
      <script src="/js/jquery.min.js"></script>
      <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
      <script type="text/javascript">
           //modal框样式
               $('#flash-overlay-modal').modal();
              //或者普通样式
          $('div.alert').not('.alert-important').delay(3000).slideUp(300);
      </script>
    4. 控制器调用,两种区别只是颜色不同而已
              flash('Your article has been created!');
              flash()->success('Your article has been created!');
           //使用modal
      flash()->overlay('Your article has been created!','Good Job');
  • 相关阅读:
    python
    redis
    mongodb replica on aws ec2
    mysql
    java正则表达式
    终端make命令和Git学习
    linux和shell学习
    centos普通用户安装jenkins
    centos7普通用户安装jdk
    WPF动画
  • 原文地址:https://www.cnblogs.com/fenle/p/4808213.html
Copyright © 2011-2022 走看看