laravel基于Bootstrap的成功和失败的提示信息和验证提示信息
message.blade.php
<!-- 成功提示框 -->
@if(Session::has("success"))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<strong>成功!</strong> {{Session::get('success')}}
</div>
@endif
<!-- 失败提示框 -->
@if(Session::has("error"))
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<strong>失败!</strong> {{Session::get('error')}}
</div>
@endif
validattor.blade.php
<!-- 所有的错误提示 -->
@if(count($errors))
<!--展示第一条错误信息-->
<div class="alert alert-danger">
<ul>
<li>{{$errors->first()}}</li>
</ul>
</div>
<!--遍历所有的错误信息-->
<div class="alert alert-danger">
<ul>
@foreach($errors->all() as $error)
<li>{{$error}}</li>
@endforeach
</ul>
</div>
@endif
validation错误提示:
@if(count($errors)>0)
<div class="alert alert-danger" role="alert">
@foreach($errors->all() as $error)
<li>{{$error}}</li>
@endforeach
</div>
@endif
laravel基于Bootstrap的成功和失败的提示信息和验证提示信息的更多相关文章
- [转载:Q1mi]Bootstrap和基于Bootstrap的登录验证示例
转载自:Q1mi Bootstrap介绍 Bootstrap是Twitter开源的基于HTML.CSS.JavaScript的前端框架. 它是为实现快速开发Web应用程序而设计的一套前端工具包. 它支 ...
- 自己写的基于bootstrap风格的弹框插件
自己写的一款基于bootstrap风格的弹框插件,暂时只有确认框.提示框.后续功能扩展.bug修改再更新. ;(function($){ //默认参数 var PARAMS; var DEFAULTP ...
- C#开发微信门户及应用(46)-基于Bootstrap的微信门户应用管理系统功能介绍
在前面介绍很多的微信框架,基本上都采用EasyUI的界面来搭建的微信框架,如随笔<C#开发微信门户及应用(8)-微信门户应用管理系统功能介绍>介绍的一样,不过随着微信的H5应用越来越多,因 ...
- 基于bootstrap表单登录(带验证码)
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <!-- ...
- 基于bootstrap的上传插件fileinput实现ajax异步上传功能(支持多文件上传预览拖拽)
首先需要导入一些js和css文件 ? 1 2 3 4 5 6 <link href="__PUBLIC__/CSS/bootstrap.css" rel="exte ...
- 基于Bootstrap+jQuery.validate Form表单验证实践
基于Bootstrap jQuery.validate Form表单验证实践 项目结构 : github 上源码地址:https://github.com/starzou/front-end- ...
- 基于Bootstrap Ace模板+bootstrap.addtabs.js的菜单
这几天研究了基于bootstrap Ace模板+bootstra.addtabs.js实现菜单的效果 参考了这个人的博客 https://www.cnblogs.com/landeanfen/p/76 ...
- 基于Bootstrap的对话框插件bootstrap-dialog
写在前面: bootstrap本身提供了它自己的模态框,但是感觉并不太友好,当需要在页面点击一个按钮打开一个窗口页面时,使用原有的bootstrap的模态框,会把所有的代码全部写在一个jsp页面,显得 ...
- 基于BootStrap,FortAweSome,Ajax的学生管理系统
一. 基于BootStrap,FortAweSome,Ajax的学生管理系统代码部分 1.students.html <1>html页面文件 <!DOCTYPE html> & ...
随机推荐
- Python day3_string的常见方法2_笔记
1.分割字符串的4个方法partition,rpartition,split,rsplit(区别,partition是仅分割一个,split分割全部,r是从右边开始分割,split可以传参数,自定义分 ...
- WebAPI使用Token进行验证
1.需要用到的包 可以先敲代码 发现没有包在添加 2.在项目根目录下Web层添加“Startup”类 这个是Token的配置 3.在WebAPI层添加WebApiConfig类 也是Tok ...
- nginx 启动报错 1113: No mapping for the Unicode character exists in the target multi-byte code
failed (1113: No mapping for the Unicode character exists in the target multi-byte code page) 因为路径有中 ...
- Windows 操作系统与内核版本号
Win10查询内部版本(内核版本)的方法:1.按下Win+R组合键启动“运行”窗口,输入“msconfig”并确定2.在“系统配置”窗口中点击“工具”标签,选择“关于Windows”一项后点击“启动” ...
- Python&HDF5目录
最近一直没更新python&量化的博客,是因为忙于看HDF5的书,写VNPY框架,学scrapy爬虫. 本来写博客的目的就是为了当作一种教材,当遇到不会的问题过来找答案. 对于HDF5下面这本 ...
- Lasso linear model实例 | Proliferation index | 评估单细胞的增殖指数
背景:We developed a cell-cycle scoring approach that uses expression data to compute an index for ever ...
- asp.net网站服务器搭建之从零开始
asp.net网站服务器搭建之从零开始 一 IIS(Internet Information Services)安装: 1.选择"控制面板". 2.点"添加或删除程序 ...
- gcc请不要优化
gdb跟踪剖发现free_area_init中一段优化错了,如下: memset(mem_map, 0, start_mem - (unsigned long) mem_map); do ...
- 从早期 Spring Boot 版本升级
如果你现在正在从早期的 Spring Boot 版本进行升级的话,请访问 “migration guide” on the project wiki 页面,这个页面提供了有关升级的详细指南.同时也请查 ...
- dcoker 安装mysql和数据持久化
# mysql 镜像下载 docker pull mysql ( 版本自己选择) # run 服务 docker run --name mysql.5.5 -p 3306:3306 -e MYSQ ...