安装"laracasts/flash": "^1.3"
包后,我正在尝试创建一个视图,这是我的代码:
@include('gazett.errors')
Run Code Online (Sandbox Code Playgroud)
在gazett.errors
blade.php文件代码中的位置在这里:
<div class="row">
<div class="col-md-7 col-md-push-3" style="padding: 5px 24px!important;">
@include('flash::message')
@if($errors->any())
<ul class="alert alert-danger text-center rtl ur fsize26" style="list-style: none;">
@foreach($errors->all() as $error)
<li style="color: #000 !important;"> {{ $error }} </li>
@endforeach
</ul>
@endif
</div>
Run Code Online (Sandbox Code Playgroud)
但我收到此错误:没有为[flash]定义提示路径.
当我的目录结构中给出的链接目录结构 当我访问浏览器,错误是在这里:
ErrorException in FileViewFinder.php line 112:
Run Code Online (Sandbox Code Playgroud)
没有为[flash]定义提示路径.(查看:E:\ Web\xampp\htdocs\wifaq-atropos\resources\views\gazett\errors.blade.php)(查看:E:\ Web\xampp\htdocs\wifaq-atropos\resources\views\gazett\errors.blade.php)(查看:E:\ Web\xampp\htdocs\wifaq-atropos\resources\views\gazett\errors.blade.php)
当我尝试将laravel版本从5.0升级到5.2时,问题出现了.以前版本的项目5.0中没有错误.怎么解决?