摘要: {{--流程控制--}} @if($name == '1') this is 1 @elseif($name == '2') this.is 2 @else who am i? @endif @foreach($students as $student) {{ $student->name }} @endforeach {{--若有值则循环,没有就打印null--}} @f... 阅读全文
posted @ 2018-07-17 13:54 白po 阅读(348) 评论(0) 推荐(0) 编辑
摘要: 模型文件 使用模型查询数据 使用模型新增数据 使用create方法添加数据 使用模型修改数据 使用模型删除数据 阅读全文
posted @ 2018-07-17 12:38 白po 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 控制器文件: HomeController.php 基本的控制器+路由 路由参数获取+路由别名 Controller之request Controller之Session 首先在控制器中引入 session类 use Illuminate\Support\Facades\Session; Contr 阅读全文
posted @ 2018-07-16 22:15 白po 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 基本路由 多请求路由 路由参数 带参数路由,可设置默认值,也可以设置正则验证 路由别名 路由群组 返回视图 阅读全文
posted @ 2018-07-16 21:50 白po 阅读(125) 评论(0) 推荐(0) 编辑