Blogger Information
Blog 43
fans 0
comment 0
visits 30348
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
模板的应用
橙絮圆
Original
634 people have browsed it

模板的应用

作业标题:0906作业
作业内容:1模板内容记住 2.后台模板分块


  1. @extends('app')
  2. @section('title','流程控制')
  3. @section('content')
  4. @isset($num)
  5. @if($num==2)
  6. 我是1
  7. @elseif($num==3)
  8. 我是3
  9. @else
  10. 我不等于2
  11. @endif
  12. @endisset
  13. <hr>
  14. @unless(true)
  15. 我输出了没有
  16. @endunless
  17. {{--循环--}}
  18. {{--for--}}
  19. @for($i=0;$i<=10;$i++)
  20. {{$i}}<br/>
  21. @endfor
  22. @foreach($data as $k=>$val)
  23. 键为{{$k}},值为:{{$val}}<br/>
  24. @endforeach
  25. @forelse($data as $user)
  26. <li>{{$user}}</li>
  27. @empty
  28. <p>No users</p>
  29. @endforelse
  30. @foreach($data as $k=>$v)
  31. @if($loop->first)
  32. 我是第一次循环,我的值是:{{$v}}
  33. @elseif($loop->last)
  34. 我是最后一次循环,我的值是:{{$v}}
  35. @endif
  36. <br>
  37. {{$loop->index}}
  38. <br>
  39. @endforeach
  40. @include('heihei');
  41. @endsection
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post