已知
{{ isset($name)? $name: 'default' }}
可以简写为
{{ $name or 'default'}}
那么
{{old('student')['name'] ? old('student')['name']: $student->name}}
可否简写为
{{old('student')['name'] or $student->name}}
截图来自链接 http://www.imooc.com/video/12524 (视频4分42秒的时候)
我本来打算把截图里的最后一行简写成 {{x or y}} 的形式的,结果就发现这问题了。
也就是说
{{old('student')['name'] ? old('student')['name']: $student->name}}
不能简写成
{{old('student')['name'] or $student->name}}
不知道为什么不行啊?