1、web.php 设置访问路径
上面的view()所在 resources文件中
2、控制器 — controller
3、blade模板引擎
条件判断
循环语法
@for($i=0;$i<5;$i++)
<div>www</div>
@endfor
@foreach($lists as $key=>$val)
<div>{{$key}}-{{$val['name']}}</div>
@endforeach
@while($item = array_pop($lists))
<div>{{$item}}</div>
@endwhile
@while($item = array_shift($lists))
<div>{{$item}}</div>
@endwhile
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号